// URL fragment: /products/search?names=apple&names=nectarine&page=1 Backbone.history.path // 'products/search' Backbone.history.params['names'] // ['apple', 'nectarine'] Backbone.history.params['page'] // '1'
It also works with
The author has included Backbone’s router tests to demonstrate that Backbone’s original functionality still works, and has added new tests for Colonne.
n8iv (License: MIT) by Christos Constandinou is an OO library that extends native objects with
Object.defineProperty. The author has written lots of documentation that’s viewable on GitHub at constantology / n8iv / docs. The documentation shows what objects have been extended and what the n8iv classes provide.
For example, there’s an event library that works like this:
var observer = n8iv.Observer.create(); observer.log = console.log; observer.on('foo', log) .on('foo', observer.log, observer) .broadcast('foo', 1, 2, 3);
n8iv.Class library supports mixins, singletons, and super methods.
The author also notes that native methods are not overridden if they’re already defined. In addition, the other n8iv libraries like
n8iv.Oo.js can be used without the native extensions.
Three Bad Parts
John argues that once
When was the last time that you had a really hard time using the
voidkeyword or were foiled by type coercion?