Mote.js, Resizer, o_O, JLS

13 Feb 2012 | By Alex Young | Tags libraries templates responsive frameworks

Mote.js

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: ')
  , triple = mote.compile('triple: }')
  , ampersand = mote.compile('ampersand: ')
  , 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('Hello, .')
  , data = {
      name: 'Arthur Dent',
      lambda: function(fn) {
        return fn() + ' ' + fn().toUpperCase();
      }
    };

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

Resizer

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.

o_O

o_O (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'
name('Bob')

// 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:

  • More Web Browser GUI support: button, edit, table, etc.
  • Native image manipulation: subsampling, convolution, EXIF support
  • Simple XML Exchange (SXE) support for native, web browser and PHP
  • SQL support since 0.4 (for MySQL)
  • AMD is now used for defining and loading the framework’s classes

blog comments powered by Disqus