Mote.js, Resizer, o_O, JLS

2012-02-13 00:00:00 +0000 by Alex R. Young


Mote.js (License: MIT, GitHub: satchmorun / mote, npm: mote) by "satchmorun" is a Mustache implementation with some impressive benchmarks. It runs in both Node and browsers, and usage should look familiar to users of existing Mustache engines:

var normal = mote.compile('escaped: {{data}}')
  , triple = mote.compile('triple: {{{data}}}')
  , ampersand = mote.compile('ampersand: {{&data}}')
  , data = {data: '& " < >'};

normal(data);    //=> 'escaped: &amp; &quot; &lt; &gt;'
triple(data);    //=> 'triple: & " < >'
ampersand(data); //=> 'ampersand: & " < >'

Mote passes the Mustache spec, except for the optional lambda functionality:

var keyFn = mote.compile('{{#lambda}}Hello, {{name}}.{{/lambda}}')
  , data = {
      name: 'Arthur Dent',
      lambda: function(fn) {
        return fn() + ' ' + fn().toUpperCase();

keyFn(data); //=> 'Hello, Arthur Dent. HELLO, ARTHUR DENT.'


Resizer logo

Resizer (GitHub: egdelwonk / Resizer) by William Golden is a bookmarklet designed to aid responsive design. Popular resolutions for mobile devices are included so it's easy to switch a page between a tablet view, desktop, and mobile. The current page can also be reloaded or reset.

There's even a Resizer Chrome Extension, for those of us who prefer buttons to the extra screen real estate added by bookmark bars.


oO (License: _MIT) by Jonah Fox is a new HTML binding library that draws on the simplicity of Backbone.js's collections, and the bindings of Ember and Knockout. The main methods provided by the library are property, bind, and collection:

var name = o_O.property('John');
o_O.bind(name, '#person');

// HTML text is now 'John'

// HTML text is now 'Bob'

It ships with Mocha tests, and has been tested in IE 7,8,9, Chrome 16, Firefox 4 and Safari 5.

JLS Updates

JLS (License: LGPL) is a JavaScript platform that we've featured previously on DailyJS in Gestures, Scopeleaks, Wink, JLS, JavaScript Blogs. The authors have been working on it over the last year, and have recently released a whole load of new features: