Convenience function for performing a groupBy
on a list then a sortBy
on the resulting groups using Underscore methods.
sortedGroupBy(list, groupByIterator, sortByIterator)
Convenience function for performing a groupBy
on a list then a sortBy
on the resulting groups using Underscore methods.
sortedGroupBy(list, groupByIterator, sortByIterator)
function eachAsync(iter, list, delay) { | |
var i = 0, | |
stopped = false, | |
fwhenDone; | |
delay = delay || 0; | |
function run() { | |
iter(list[i], done); | |
} | |
function hold() { |
(function() { | |
var arrays, basicObjects, deepClone, deepExtend, deepExtendCouple, isBasicObject, | |
__slice = [].slice; | |
deepClone = function(obj) { | |
var func, isArr; | |
if (!_.isObject(obj) || _.isFunction(obj)) { | |
return obj; | |
} | |
if (_.isDate(obj)) { |
function findKey(obj, value){ | |
var key; | |
_.each(_.keys(obj), function(k){ | |
var v = obj[k]; | |
if (v === value){ | |
key = k; | |
} | |
}); |
/** | |
* Original author: David Eads (https://github.com/eads) | |
* | |
* Wrap D3 charting components in a simple Backbone view interface | |
* | |
* Provides a redrawing path, data sync, and fallback for non-d3 browsers. | |
* | |
* Views that extend ChartView should implement their own "draw" function and go to work. | |
* | |
* var collection = new Backbone.Collection([ ["Maria", 33], ["Heather", 29] ]); |
Handlebars.TemplateLoader.load(["index", "list", "detail"], { | |
complete: function() { | |
var router = new Router(); | |
Backbone.history.start(); | |
} | |
}); | |
//---- | |
Handlebars.TemplateLoader.config({prefix: "/hbs/"}); |