mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
Compare commits
4 Commits
1.0.0-rc.1
...
1.0.0-rc.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54b862bd79 | ||
|
|
e37e1c109a | ||
|
|
939123785b | ||
|
|
221b347bd9 |
42
README.md
42
README.md
@@ -1,4 +1,4 @@
|
||||
# Lo-Dash <sup>v1.0.0-rc.1</sup>
|
||||
# Lo-Dash <sup>v1.0.0-rc.2</sup>
|
||||
[](http://travis-ci.org/bestiejs/lodash)
|
||||
|
||||
A utility library, usable as a drop-in replacement for Underscore, delivering [performance](http://lodash.com/benchmarks), [bug fixes](https://github.com/bestiejs/lodash#resolved-underscorejs-issues), and [additional features](http://lodash.com/#features).
|
||||
@@ -6,18 +6,18 @@ A utility library, usable as a drop-in replacement for Underscore, delivering [p
|
||||
## Download
|
||||
|
||||
* Lo-Dash builds:<br>
|
||||
[Development](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.1/lodash.js) and
|
||||
[Production](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.1/lodash.min.js)
|
||||
[Development](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.2/lodash.js) and
|
||||
[Production](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.2/lodash.min.js)
|
||||
|
||||
* Underscore builds:<br>
|
||||
[Development](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.1/lodash.underscore.js) and
|
||||
[Production](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.1/lodash.underscore.min.js)
|
||||
[Development](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.2/lodash.underscore.js) and
|
||||
[Production](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.2/lodash.underscore.min.js)
|
||||
|
||||
* CDN copies of ≤ v1.0.0-rc.1’s builds are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/):<br>
|
||||
[Lo-Dash development](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.1/lodash.js),
|
||||
[Lo-Dash production](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.1/lodash.min.js),
|
||||
[Underscore development](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.1/lodash.underscore.js), and
|
||||
[Underscore production](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.1/lodash.underscore.min.js)
|
||||
* CDN copies of ≤ v1.0.0-rc.2’s builds are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/):<br>
|
||||
[Lo-Dash development](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.2/lodash.js),
|
||||
[Lo-Dash production](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.2/lodash.min.js),
|
||||
[Underscore development](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.2/lodash.underscore.js), and
|
||||
[Underscore production](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.2/lodash.underscore.min.js)
|
||||
|
||||
* For optimal file size, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need
|
||||
|
||||
@@ -43,6 +43,7 @@ For more information check out these screencasts over Lo-Dash:
|
||||
## Features
|
||||
|
||||
* AMD loader support ([RequireJS](http://requirejs.org/), [curl.js](https://github.com/cujojs/curl), etc.)
|
||||
* [_(…)](http://lodash.com/docs#_) supports intuitive chaining without calling [_(…).chain](http://lodash.com/docs#prototype_chain)
|
||||
* [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”* defined](http://michaux.ca/articles/lazy-function-definition-pattern) methods
|
||||
* [_.clone](http://lodash.com/docs#clone) supports *“deep”* cloning
|
||||
* [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` argument
|
||||
@@ -227,17 +228,22 @@ require({
|
||||
|
||||
## Resolved Underscore.js issues
|
||||
|
||||
* Allow iteration of objects with a `length` property [[#799](https://github.com/documentcloud/underscore/pull/799), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.1/test/test.js#L605-L611)]
|
||||
* Fix cross-browser object iteration bugs [[#60](https://github.com/documentcloud/underscore/issues/60), [#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.1/test/test.js#L618-L642)]
|
||||
* Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [#742](https://github.com/documentcloud/underscore/issues/742), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.1/test/test.js#L140-L146)]
|
||||
* `_.isEmpty` should support jQuery/MooTools DOM query collections [[#690](https://github.com/documentcloud/underscore/pull/690), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.1/test/test.js#L807-L812)]
|
||||
* `_.isObject` should avoid V8 bug [#2291](http://code.google.com/p/v8/issues/detail?id=2291) [[#605](https://github.com/documentcloud/underscore/issues/605), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.1/test/test.js#L888-L900)]
|
||||
* `_.keys` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.1/test/test.js#L981-L983)]
|
||||
* `_.range` should coerce arguments to numbers [[#634](https://github.com/documentcloud/underscore/issues/634), [#683](https://github.com/documentcloud/underscore/issues/683), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.1/test/test.js#L1382-L1385)]
|
||||
* Allow iteration of objects with a `length` property [[#799](https://github.com/documentcloud/underscore/pull/799), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.2/test/test.js#L605-L611)]
|
||||
* Fix cross-browser object iteration bugs [[#60](https://github.com/documentcloud/underscore/issues/60), [#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.2/test/test.js#L618-L642)]
|
||||
* Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [#742](https://github.com/documentcloud/underscore/issues/742), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.2/test/test.js#L140-L146)]
|
||||
* `_.isEmpty` should support jQuery/MooTools DOM query collections [[#690](https://github.com/documentcloud/underscore/pull/690), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.2/test/test.js#L807-L812)]
|
||||
* `_.isObject` should avoid V8 bug [#2291](http://code.google.com/p/v8/issues/detail?id=2291) [[#605](https://github.com/documentcloud/underscore/issues/605), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.2/test/test.js#L888-L900)]
|
||||
* `_.keys` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.2/test/test.js#L981-L983)]
|
||||
* `_.range` should coerce arguments to numbers [[#634](https://github.com/documentcloud/underscore/issues/634), [#683](https://github.com/documentcloud/underscore/issues/683), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.2/test/test.js#L1382-L1385)]
|
||||
|
||||
## Release Notes
|
||||
|
||||
### <sup>v1.0.0-rc.1</sup>
|
||||
### <sup>v1.0.0-rc.2</sup> ###
|
||||
|
||||
* Specified more method chaining behaviors
|
||||
* Updated `underscore` build compatibility to v1.4.3
|
||||
|
||||
### <sup>v1.0.0-rc.1</sup> ###
|
||||
|
||||
#### Compatibility Warnings ####
|
||||
|
||||
|
||||
94
build.js
94
build.js
@@ -124,7 +124,7 @@
|
||||
'memoize': [],
|
||||
'merge': ['forOwn', 'isArray', 'isPlainObject'],
|
||||
'min': ['forEach', 'isArray', 'isString'],
|
||||
'mixin': ['filter', 'forEach', 'functions'],
|
||||
'mixin': ['forEach', 'forOwn', 'functions'],
|
||||
'noConflict': [],
|
||||
'object': [],
|
||||
'omit': ['forIn', 'indexOf'],
|
||||
@@ -366,6 +366,8 @@
|
||||
.replace(/(?:(?:\s*\/\/.*)*\s*lodash\._[^=]+=.+\n)+/g, '\n')
|
||||
// remove lines with just whitespace and semicolons
|
||||
.replace(/^ *;\n/gm, '')
|
||||
// consolidate multiple newlines
|
||||
.replace(/\n{3,}/g, '\n\n')
|
||||
// consolidate consecutive horizontal rule comment separators
|
||||
.replace(/(?:\s*\/\*-+\*\/\s*){2,}/g, function(separators) {
|
||||
return separators.match(/^\s*/)[0] + separators.slice(separators.lastIndexOf('/*'));
|
||||
@@ -439,7 +441,7 @@
|
||||
* @returns {String} Returns the method assignments snippet.
|
||||
*/
|
||||
function getMethodAssignments(source) {
|
||||
return (source.match(/lodash\.VERSION *= *[\s\S]+?\/\*-+\*\/\n/) || [''])[0];
|
||||
return (source.match(/\/\*-+\*\/\n(?:\s*\/\/.*)*\s*lodash\.\w+ *=[\s\S]+?lodash\.VERSION *=.+/) || [''])[0];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -841,7 +843,7 @@
|
||||
// clip snippet after the JSDoc comment block
|
||||
match = match.replace(/^\s*(?:\/\/.*|\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)\n/, '');
|
||||
source = source.replace(match, function() {
|
||||
return funcValue;
|
||||
return funcValue.trimRight() + '\n';
|
||||
});
|
||||
}
|
||||
return source;
|
||||
@@ -1313,13 +1315,6 @@
|
||||
' }'
|
||||
].join('\n'));
|
||||
|
||||
// replace `_.isFinite`
|
||||
source = replaceFunction(source, 'isFinite', [
|
||||
' function isFinite(value) {',
|
||||
' return nativeIsFinite(value) && toString.call(value) == numberClass;',
|
||||
' }'
|
||||
].join('\n'));
|
||||
|
||||
// replace `_.omit`
|
||||
source = replaceFunction(source, 'omit', [
|
||||
' function omit(object) {',
|
||||
@@ -1412,6 +1407,11 @@
|
||||
' result = [],',
|
||||
' seen = result;',
|
||||
'',
|
||||
" if (typeof isSorted == 'function') {",
|
||||
' thisArg = callback;',
|
||||
' callback = isSorted;',
|
||||
' isSorted = false;',
|
||||
' }',
|
||||
' if (callback) {',
|
||||
' seen = [];',
|
||||
' callback = createCallback(callback, thisArg);',
|
||||
@@ -1437,7 +1437,7 @@
|
||||
// replace `_.uniqueId`
|
||||
source = replaceFunction(source, 'uniqueId', [
|
||||
' function uniqueId(prefix) {',
|
||||
' var id = idCounter++;',
|
||||
" var id = ++idCounter + '';",
|
||||
' return prefix ? prefix + id : id;',
|
||||
' }'
|
||||
].join('\n'));
|
||||
@@ -1467,17 +1467,22 @@
|
||||
' }'
|
||||
].join('\n'));
|
||||
|
||||
// add `__chain__` checks to `_.mixin` and Array function wrappers
|
||||
source = source.replace(/^( *)forEach\([\s\S]+?\n\1}.+/gm, function(match) {
|
||||
return match.replace(/^( *)return new lodash\(([^)]+)\).+/m, function(submatch, indent, varName) {
|
||||
return indent + [
|
||||
'if (this.__chain__) {',
|
||||
' varName = new lodash(varName);',
|
||||
' varName.__chain__ = true;',
|
||||
'}',
|
||||
'return varName;'
|
||||
].join('\n' + indent)
|
||||
.replace(/varName/g, varName);
|
||||
// add `__chain__` checks to `_.mixin` and `Array` function wrappers
|
||||
_.each([
|
||||
matchFunction(source, 'mixin'),
|
||||
/(?:\s*\/\/.*)*\n( *)forEach\(\['[\s\S]+?\n\1}.+/g
|
||||
], function(pattern) {
|
||||
source = source.replace(pattern, function(match) {
|
||||
return match.replace(/( *)return new lodash\(([^)]+)\).+/, function(submatch, indent, varName) {
|
||||
return indent + [
|
||||
'if (this.__chain__) {',
|
||||
' varName = new lodash(varName);',
|
||||
' varName.__chain__ = true;',
|
||||
'}',
|
||||
'return varName;'
|
||||
].join('\n' + indent)
|
||||
.replace(/varName/g, varName);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1494,12 +1499,21 @@
|
||||
});
|
||||
|
||||
// remove `lodash.prototype.toString` and `lodash.prototype.valueOf` assignments
|
||||
source = source.replace(/ *lodash\.prototype\.(?:toString|valueOf) *=.+\n/g, '');
|
||||
source = source.replace(/^ *lodash\.prototype\.(?:toString|valueOf) *=.+\n/gm, '');
|
||||
|
||||
// remove `lodash.prototype` batch method assignments
|
||||
source = source
|
||||
.replace(/(?:\s*\/\/.*)*\n( *)forEach\(\['first'[\s\S]+?\n\1}.+/, '')
|
||||
.replace(/(?:\s*\/\/.*)*\n( *)forEach\(filter[\s\S]+?lodash\.[\s\S]+?\n\1}.+/, '');
|
||||
source = source.replace(/(?:\s*\/\/.*)*\n( *)forOwn\(lodash, *function\(func, *methodName\)[\s\S]+?\n\1}.+/g, '');
|
||||
|
||||
// move `mixin(lodash)` to after the method assignments
|
||||
source = source.replace(/(?:\s*\/\/.*)*\s*mixin\(lodash\).+/, '');
|
||||
source = source.replace(getMethodAssignments(source), function(match) {
|
||||
return match + [
|
||||
'',
|
||||
'',
|
||||
' // add functions to `lodash.prototype`',
|
||||
' mixin(lodash);'
|
||||
].join('\n');
|
||||
});
|
||||
|
||||
// remove unused features from `createBound`
|
||||
if (buildMethods.indexOf('partial') == -1) {
|
||||
@@ -1619,23 +1633,23 @@
|
||||
modified = snippet;
|
||||
|
||||
if (!exposeAssign) {
|
||||
modified = modified.replace(/(?:\n *\/\/.*\s*)* *lodash\.assign *= *.+\n/, '');
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.assign *= *.+\n/m, '');
|
||||
}
|
||||
if (!exposeForIn) {
|
||||
modified = modified.replace(/(?:\n *\/\/.*\s*)* *lodash\.forIn *= *.+\n/, '');
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.forIn *= *.+\n/m, '');
|
||||
}
|
||||
if (!exposeForOwn) {
|
||||
modified = modified.replace(/(?:\n *\/\/.*\s*)* *lodash\.forOwn *= *.+\n/, '');
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.forOwn *= *.+\n/m, '');
|
||||
}
|
||||
if (!exposeIsPlainObject) {
|
||||
modified = modified.replace(/(?:\n *\/\/.*\s*)* *lodash\.isPlainObject *= *.+\n/, '');
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.isPlainObject *= *.+\n/m, '');
|
||||
}
|
||||
source = source.replace(snippet, modified);
|
||||
}());
|
||||
|
||||
// replace `isArguments` and its fallback
|
||||
(function() {
|
||||
var snippet = matchFunction(source, 'isArguments');
|
||||
var snippet = matchFunction(source, 'isArguments').trimRight();
|
||||
snippet = snippet.replace(/function isArguments/, 'lodash.isArguments = function');
|
||||
|
||||
source = removeFunction(source, 'isArguments');
|
||||
@@ -1821,6 +1835,8 @@
|
||||
source = removeIsFunctionFallback(source);
|
||||
}
|
||||
if (isRemoved(source, 'mixin')) {
|
||||
source = removeVar(source, 'hasObjectSpliceBug');
|
||||
|
||||
// simplify the `lodash` function
|
||||
source = replaceFunction(source, 'lodash', [
|
||||
' function lodash() {',
|
||||
@@ -1828,17 +1844,17 @@
|
||||
' }'
|
||||
].join('\n'));
|
||||
|
||||
// remove `lodash.prototype` additions
|
||||
source = source.replace(/(?:\s*\/\/.*)*\s*mixin\(lodash\)[\s\S]+?\/\*-+\*\//, '');
|
||||
source = removeVar(source, 'hasObjectSpliceBug');
|
||||
// remove all `lodash.prototype` additions
|
||||
source = source
|
||||
.replace(/(?:\s*\/\/.*)*\n( *)forOwn\(lodash, *function\(func, *methodName\)[\s\S]+?\n\1}.+/g, '')
|
||||
.replace(/(?:\s*\/\/.*)*\n( *)forEach\(\['[\s\S]+?\n\1}.+/g, '')
|
||||
.replace(/(?:\s*\/\/.*)*\s*mixin\(lodash\).+\n/, '')
|
||||
.replace(/(?:\s*\/\/.*)*\s*lodash\.prototype.+\n/, '');
|
||||
}
|
||||
|
||||
// remove pseudo private properties
|
||||
source = source.replace(/(?:(?:\s*\/\/.*)*\s*lodash\._[^=]+=.+\n)+/g, '\n');
|
||||
|
||||
// assign debug source before further modifications that rely on the minifier
|
||||
// to remove unused variables and other dead code
|
||||
debugSource = source;
|
||||
debugSource = cleanupSource(source);
|
||||
|
||||
// remove associated functions, variables, and code snippets that the minifier may miss
|
||||
if (isRemoved(source, 'clone')) {
|
||||
@@ -1891,6 +1907,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
source = cleanupSource(source);
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
// used to specify creating a custom build
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
'lodash':
|
||||
'/*!\n' +
|
||||
' Lo-Dash @VERSION lodash.com/license\n' +
|
||||
' Underscore.js 1.4.2 underscorejs.org/LICENSE\n' +
|
||||
' Underscore.js 1.4.3 underscorejs.org/LICENSE\n' +
|
||||
'*/',
|
||||
'underscore':
|
||||
'/*! Underscore.js @VERSION underscorejs.org/LICENSE */'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Lo-Dash <sup>v1.0.0-rc.1</sup>
|
||||
# Lo-Dash <sup>v1.0.0-rc.2</sup>
|
||||
|
||||
<!-- div -->
|
||||
|
||||
@@ -3050,7 +3050,7 @@ _.uniqueId();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_version"></a>`_.VERSION`
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4168 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4318 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: The semantic version number.
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// generate Markdown
|
||||
$markdown = docdown(array(
|
||||
'path' => '../' . $file,
|
||||
'title' => 'Lo-Dash <sup>v1.0.0-rc.1</sup>',
|
||||
'title' => 'Lo-Dash <sup>v1.0.0-rc.2</sup>',
|
||||
'toc' => 'categories',
|
||||
'url' => 'https://github.com/bestiejs/lodash/blob/master/lodash.js'
|
||||
));
|
||||
|
||||
206
lodash.js
206
lodash.js
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Lo-Dash 1.0.0-rc.1 <http://lodash.com>
|
||||
* Lo-Dash 1.0.0-rc.2 <http://lodash.com>
|
||||
* (c) 2012 John-David Dalton <http://allyoucanleet.com/>
|
||||
* Based on Underscore.js 1.4.2 <http://underscorejs.org>
|
||||
* Based on Underscore.js 1.4.3 <http://underscorejs.org>
|
||||
* (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
||||
* Available under MIT license <http://lodash.com/license>
|
||||
*/
|
||||
@@ -4158,50 +4158,81 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The semantic version number.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type String
|
||||
*/
|
||||
lodash.VERSION = '1.0.0-rc.1';
|
||||
|
||||
// assign static methods
|
||||
// add functions that return wrapped values when chaining
|
||||
lodash.assign = assign;
|
||||
lodash.after = after;
|
||||
lodash.bind = bind;
|
||||
lodash.bindAll = bindAll;
|
||||
lodash.bindKey = bindKey;
|
||||
lodash.chain = chain;
|
||||
lodash.clone = clone;
|
||||
lodash.compact = compact;
|
||||
lodash.compose = compose;
|
||||
lodash.contains = contains;
|
||||
lodash.countBy = countBy;
|
||||
lodash.debounce = debounce;
|
||||
lodash.defaults = defaults;
|
||||
lodash.defer = defer;
|
||||
lodash.delay = delay;
|
||||
lodash.difference = difference;
|
||||
lodash.escape = escape;
|
||||
lodash.every = every;
|
||||
lodash.filter = filter;
|
||||
lodash.find = find;
|
||||
lodash.first = first;
|
||||
lodash.flatten = flatten;
|
||||
lodash.forEach = forEach;
|
||||
lodash.forIn = forIn;
|
||||
lodash.forOwn = forOwn;
|
||||
lodash.functions = functions;
|
||||
lodash.groupBy = groupBy;
|
||||
lodash.has = has;
|
||||
lodash.identity = identity;
|
||||
lodash.indexOf = indexOf;
|
||||
lodash.initial = initial;
|
||||
lodash.intersection = intersection;
|
||||
lodash.invert = invert;
|
||||
lodash.invoke = invoke;
|
||||
lodash.keys = keys;
|
||||
lodash.map = map;
|
||||
lodash.max = max;
|
||||
lodash.merge = merge;
|
||||
lodash.min = min;
|
||||
lodash.object = object;
|
||||
lodash.omit = omit;
|
||||
lodash.pairs = pairs;
|
||||
lodash.pick = pick;
|
||||
lodash.pluck = pluck;
|
||||
lodash.range = range;
|
||||
lodash.reject = reject;
|
||||
lodash.rest = rest;
|
||||
lodash.shuffle = shuffle;
|
||||
lodash.sortBy = sortBy;
|
||||
lodash.tap = tap;
|
||||
lodash.times = times;
|
||||
lodash.toArray = toArray;
|
||||
lodash.union = union;
|
||||
lodash.uniq = uniq;
|
||||
lodash.values = values;
|
||||
lodash.where = where;
|
||||
lodash.without = without;
|
||||
lodash.zip = zip;
|
||||
|
||||
// add aliases
|
||||
lodash.collect = map;
|
||||
lodash.drop = rest;
|
||||
lodash.each = forEach;
|
||||
lodash.extend = assign;
|
||||
lodash.methods = functions;
|
||||
lodash.select = filter;
|
||||
lodash.tail = rest;
|
||||
lodash.unique = uniq;
|
||||
|
||||
// add functions to `lodash.prototype`
|
||||
mixin(lodash);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// add functions that return unwrapped values when chaining
|
||||
lodash.after = after;
|
||||
lodash.bind = bind;
|
||||
lodash.bindKey = bindKey;
|
||||
lodash.clone = clone;
|
||||
lodash.compose = compose;
|
||||
lodash.contains = contains;
|
||||
lodash.debounce = debounce;
|
||||
lodash.defer = defer;
|
||||
lodash.delay = delay;
|
||||
lodash.escape = escape;
|
||||
lodash.every = every;
|
||||
lodash.find = find;
|
||||
lodash.has = has;
|
||||
lodash.identity = identity;
|
||||
lodash.indexOf = indexOf;
|
||||
lodash.isArguments = isArguments;
|
||||
lodash.isArray = isArray;
|
||||
lodash.isBoolean = isBoolean;
|
||||
@@ -4219,120 +4250,89 @@
|
||||
lodash.isRegExp = isRegExp;
|
||||
lodash.isString = isString;
|
||||
lodash.isUndefined = isUndefined;
|
||||
lodash.keys = keys;
|
||||
lodash.last = last;
|
||||
lodash.lastIndexOf = lastIndexOf;
|
||||
lodash.map = map;
|
||||
lodash.max = max;
|
||||
lodash.memoize = memoize;
|
||||
lodash.merge = merge;
|
||||
lodash.min = min;
|
||||
lodash.mixin = mixin;
|
||||
lodash.noConflict = noConflict;
|
||||
lodash.object = object;
|
||||
lodash.omit = omit;
|
||||
lodash.once = once;
|
||||
lodash.pairs = pairs;
|
||||
lodash.partial = partial;
|
||||
lodash.pick = pick;
|
||||
lodash.pluck = pluck;
|
||||
lodash.random = random;
|
||||
lodash.range = range;
|
||||
lodash.reduce = reduce;
|
||||
lodash.reduceRight = reduceRight;
|
||||
lodash.reject = reject;
|
||||
lodash.rest = rest;
|
||||
lodash.result = result;
|
||||
lodash.shuffle = shuffle;
|
||||
lodash.size = size;
|
||||
lodash.some = some;
|
||||
lodash.sortBy = sortBy;
|
||||
lodash.sortedIndex = sortedIndex;
|
||||
lodash.tap = tap;
|
||||
lodash.template = template;
|
||||
lodash.throttle = throttle;
|
||||
lodash.times = times;
|
||||
lodash.toArray = toArray;
|
||||
lodash.unescape = unescape;
|
||||
lodash.union = union;
|
||||
lodash.uniq = uniq;
|
||||
lodash.uniqueId = uniqueId;
|
||||
lodash.values = values;
|
||||
lodash.where = where;
|
||||
lodash.without = without;
|
||||
lodash.wrap = wrap;
|
||||
lodash.zip = zip;
|
||||
|
||||
// assign aliases
|
||||
// add aliases
|
||||
lodash.all = every;
|
||||
lodash.any = some;
|
||||
lodash.collect = map;
|
||||
lodash.detect = find;
|
||||
lodash.drop = rest;
|
||||
lodash.each = forEach;
|
||||
lodash.extend = assign;
|
||||
lodash.foldl = reduce;
|
||||
lodash.foldr = reduceRight;
|
||||
lodash.head = first;
|
||||
lodash.include = contains;
|
||||
lodash.inject = reduce;
|
||||
lodash.methods = functions;
|
||||
lodash.select = filter;
|
||||
lodash.tail = rest;
|
||||
lodash.take = first;
|
||||
lodash.unique = uniq;
|
||||
|
||||
// add pseudo private property to be used and removed during the build process
|
||||
lodash._iteratorTemplate = iteratorTemplate;
|
||||
forOwn(lodash, function(func, methodName) {
|
||||
if (!lodash.prototype[methodName]) {
|
||||
lodash.prototype[methodName] = function() {
|
||||
var args = [this.__wrapped__];
|
||||
push.apply(args, arguments);
|
||||
return func.apply(lodash, args);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// add all static functions to `lodash.prototype`
|
||||
mixin(lodash);
|
||||
// add functions capable of returning wrapped and unwrapped values when chaining
|
||||
lodash.first = first;
|
||||
lodash.last = last;
|
||||
|
||||
// add `lodash.prototype.chain` after calling `mixin()` to avoid overwriting
|
||||
// it with the wrapped `lodash.chain`
|
||||
// add aliases
|
||||
lodash.take = first;
|
||||
lodash.head = first;
|
||||
|
||||
forOwn(lodash, function(func, methodName) {
|
||||
if (!lodash.prototype[methodName]) {
|
||||
lodash.prototype[methodName]= function(n, guard) {
|
||||
var result = func(this.__wrapped__, n, guard);
|
||||
return (n == null || guard) ? result : new lodash(result);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The semantic version number.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type String
|
||||
*/
|
||||
lodash.VERSION = '1.0.0-rc.2';
|
||||
|
||||
// add "Chaining" functions to the wrapper
|
||||
lodash.prototype.chain = wrapperChain;
|
||||
lodash.prototype.toString = wrapperToString;
|
||||
lodash.prototype.value = wrapperValueOf;
|
||||
lodash.prototype.valueOf = wrapperValueOf;
|
||||
|
||||
// add methods that are capable of returning wrapped and unwrapped values
|
||||
forEach(['first', 'last'], function(methodName) {
|
||||
var func = lodash[methodName];
|
||||
if (func) {
|
||||
lodash.prototype[methodName] = function(n, guard) {
|
||||
var result = func(this.__wrapped__, n, guard);
|
||||
return (n == null || guard)
|
||||
? result
|
||||
: new lodash(result);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// add all methods that return unwrapped values
|
||||
forEach(filter(functions(lodash), function(methodName) {
|
||||
return /^(?:bind|contains|every|find|has|is[A-Z].+|reduce.*|some)$/.test(methodName);
|
||||
}), function(methodName) {
|
||||
var func = lodash[methodName];
|
||||
|
||||
lodash.prototype[methodName] = function() {
|
||||
var args = [this.__wrapped__];
|
||||
push.apply(args, arguments);
|
||||
return func.apply(lodash, args);
|
||||
};
|
||||
});
|
||||
|
||||
// add all mutator Array functions to the wrapper.
|
||||
// add mutator `Array` functions to the wrapper
|
||||
forEach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
|
||||
lodash.prototype[methodName] = function() {
|
||||
var value = this.__wrapped__;
|
||||
func.apply(value, arguments);
|
||||
|
||||
// avoid array-like object bugs with `Array#shift` and `Array#splice` in
|
||||
// Firefox < 10 and IE < 9
|
||||
// avoid array-like object bugs with `Array#shift` and `Array#splice`
|
||||
// in Firefox < 10 and IE < 9
|
||||
if (hasObjectSpliceBug && value.length === 0) {
|
||||
delete value[0];
|
||||
}
|
||||
@@ -4340,10 +4340,9 @@
|
||||
};
|
||||
});
|
||||
|
||||
// add all accessor Array functions to the wrapper.
|
||||
// add accessor `Array` functions to the wrapper
|
||||
forEach(['concat', 'join', 'slice'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
|
||||
lodash.prototype[methodName] = function() {
|
||||
var value = this.__wrapped__,
|
||||
result = func.apply(value, arguments);
|
||||
@@ -4352,6 +4351,9 @@
|
||||
};
|
||||
});
|
||||
|
||||
// add pseudo private property to be used and removed during the build process
|
||||
lodash._iteratorTemplate = iteratorTemplate;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose Lo-Dash
|
||||
|
||||
38
lodash.min.js
vendored
38
lodash.min.js
vendored
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
Lo-Dash 1.0.0-rc.1 lodash.com/license
|
||||
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
||||
Lo-Dash 1.0.0-rc.2 lodash.com/license
|
||||
Underscore.js 1.4.3 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(e,t){function s(e){if(e&&"object"==typeof e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(t,n){return e.eval("(function("+t+"){"+n+"})")}function u(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||it);if(i)for(var s={},n=t-1;++n<r;){var o=e[n]+"";(Tt.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+"";return Tt.call(s,r)&&-1<W(s[r],n)}return-1<W(e,n,t)}}function a(e){return e.charCodeAt(0)}function f(e,t){var n=e.b,r=t.b,e=e.a,
|
||||
t=t.a;if(e!==t){if(e>t||"undefined"==typeof e)return 1;if(e<t||"undefined"==typeof t)return-1}return n<r?-1:1}function l(e,t,n){function i(){var a=arguments,f=o?this:t;return s||(e=t[u]),n.length&&(a=a.length?n.concat(g(a)):n),this instanceof i?(m.prototype=e.prototype,f=new m,m.prototype=r,a=e.apply(f,a),k(a)?a:f):e.apply(f,a)}var s=C(e),o=!n,u=t;return o&&(n=t),s||(t=e),i}function c(e,t){return e?"function"!=typeof e?function(t){return t[e]}:"undefined"!=typeof t?function(n,r,i){return e.call(t
|
||||
@@ -22,20 +22,20 @@ n)r=(0>n?Dt(0,i+n):n||0)-1;else if(n)return r=V(e,t),e[r]===t?r:-1;for(;++r<i;)i
|
||||
(Function("1")),Xt=!!e.attachEvent,Vt=Lt&&!/\n|true/.test(Lt+Xt),$t=Lt&&!Vt,Jt=_t&&(Xt||Vt),Kt,Qt,Gt=(Gt={0:1,length:1},et.splice.call(Gt,0,1),Gt[0]),Yt=n;(function(){function e(){this.x=1}var t=[];e.prototype={valueOf:1,y:1};for(var n in new e)t.push(n);for(n in arguments)Yt=!n;Kt=!/valueOf/.test(t),Qt="x"!=t[0]})(1);var Zt=!b(arguments),en="xx"!="x"[0]+Object("x")[0];try{var tn=("[object Object]",kt.call(document)==Rt)}catch(nn){}var rn={"[object Function]":i};rn[Bt]=rn[jt]=rn[Ft]=rn[It]=rn[qt]=
|
||||
rn[Rt]=rn[Ut]=rn[zt]=n;var sn={};sn[jt]=Array,sn[Ft]=Boolean,sn[It]=Date,sn[Rt]=Object,sn[qt]=Number,sn[Ut]=RegExp,sn[zt]=String;var on={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},un={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:vt,variable:""};if(Xt||Vt||!Wt)o=Function;var an={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){"
|
||||
,g:"t[i]=l[i]",c:"}}"},fn={a:"d,c,w",k:"c=c&&typeof w=='undefined'?c:e(c,w)",b:"if(c(l[i],i,d)===false)return t",g:"if(c(l[i],i,d)===false)return t"},ln={b:r},cn=h(an);Zt&&(b=function(e){return e?Tt.call(e,"callee"):i});var hn=h(fn,ln,{l:i}),pn=h(fn,ln),dn={"&":"&","<":"<",">":">",'"':""","'":"'"},vn=T(dn),mn=h(an,{g:"if(t[i]==null)"+an.g}),gn=At||function(e){return kt.call(e)==jt};C(/x/)&&(C=function(e){return"[object Function]"==kt.call(e)});var yn=xt?function(e){if(!e||"object"!=typeof
|
||||
e)return i;var t=e.valueOf,n="function"==typeof t&&(n=xt(t))&&xt(n);return n?e==n||xt(e)==n&&!b(e):w(e)}:w,bn=_t?function(e){return"function"==typeof e&&Ct.call(e,"prototype")?E(e):k(e)?_t(e):[]}:E,wn=h(fn);s.VERSION="1.0.0-rc.1",s.assign=cn,s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=J,s.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=x(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=J(e[i],e)}return e},s.bindKey=function(e,t){return l(e,t
|
||||
,g(arguments,2))},s.chain=function(e){return new s(e)},s.clone=S,s.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},s.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=_,s.countBy=function(e,t,n){var r={},t=c(t,n);return wn(e,function(e,n,i){n=t(e,n,i),Tt.call(r,n)?r[n]++:r[n]=1}),r},s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(
|
||||
){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=mn,s.defer=function(e){var n=g(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},s.delay=function(e,n){var r=g(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},s.difference=function(e){for(var t=-1,n=e?e.length:0,r=Et.apply(et,arguments),r=u(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.escape=function(e){return e==r?"":(e+"").replace(gt,d)},s.every=D,s.filter=
|
||||
P,s.find=H,s.first=U,s.flatten=z,s.forEach=wn,s.forIn=hn,s.forOwn=pn,s.functions=x,s.groupBy=function(e,t,n){var r={},t=c(t,n);return wn(e,function(e,n,i){n=t(e,n,i),(Tt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},s.has=function(e,t){return e?Tt.call(e,t):i},s.identity=K,s.indexOf=W,s.initial=function(e,t,n){if(!e)return[];var i=e.length;return g(e,0,Pt(Dt(0,i-(t==r||n?1:t||0)),i))},s.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return wn(e,function(e){if(0>W(i,e)){for(var s=n;--s;)if(!
|
||||
(r[s]||(r[s]=u(t[s])))(e))return;i.push(e)}}),i},s.invert=T,s.invoke=function(e,t){var n=g(arguments,2),r="function"==typeof t,i=[];return wn(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.isArguments=b,s.isArray=gn,s.isBoolean=function(e){return e===n||e===i||kt.call(e)==Ft},s.isDate=function(e){return kt.call(e)==It},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=kt.call(e),s=e.length;return r==jt||r==zt||r==Bt||Zt&&b(e)||r==Rt&&"number"==typeof
|
||||
s&&C(e.splice)?!s:(pn(e,function(){return t=i}),t)},s.isEqual=N,s.isFinite=function(e){return Ot(e)&&!Mt(parseFloat(e))},s.isFunction=C,s.isNaN=function(e){return L(e)&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=L,s.isObject=k,s.isPlainObject=yn,s.isRegExp=function(e){return kt.call(e)==Ut},s.isString=A,s.isUndefined=function(e){return"undefined"==typeof e},s.keys=bn,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:g(e,Dt(0,i-t))}},s.lastIndexOf=function(e,t,n){var r=e?
|
||||
e.length:0;for("number"==typeof n&&(r=(0>n?Dt(0,r+n):Pt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.map=B,s.max=j,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Tt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=O,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!gn(e))t=!t&&A(e)?a:c(t,n),wn(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},s.mixin=Q,s.noConflict=function()
|
||||
{return e._=st,this},s.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},s.omit=function(e,t,n){var r="function"==typeof t,i={};if(r)t=c(t,n);else var s=Et.apply(et,arguments);return hn(e,function(e,n,o){if(r?!t(e,n,o):0>W(s,n,1))i[n]=e}),i},s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.pairs=function(e){var t=[];return pn(e,function(e,n){t.push([n,e])}),t},s.partial=function(e){return l
|
||||
(e,g(arguments,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=Et.apply(et,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=c(t,n),hn(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=F,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+St(Ht()*((+t||0)-e+1))},s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=Dt(0,wt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=I,s.reduceRight=q,s.reject=
|
||||
function(e,t,n){return t=c(t,n),P(e,function(e,n,r){return!t(e,n,r)})},s.rest=X,s.result=function(e,t){var n=e?e[t]:r;return C(n)?e[t]():n},s.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return wn(e,function(e){var r=St(Ht()*(++t+1));n[t]=n[r],n[r]=e}),n},s.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:bn(e).length},s.some=R,s.sortBy=function(e,t,n){var r=[],t=c(t,n);wn(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(f);e--;)r[e]=r[e].c;return r},s.sortedIndex=
|
||||
V,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,u=s.templateSettings,a=0,f=n.interpolate||u.interpolate||mt,l="__p+='",c=n.variable||u.variable,h=c;e.replace(RegExp((n.escape||u.escape||mt).source+"|"+f.source+"|"+(f===vt?dt:mt).source+"|"+(n.evaluate||u.evaluate||mt).source+"|$","g"),function(t,n,i,s,o,u){return i||(i=s),l+=e.slice(a,u).replace(yt,p),n&&(l+="'+__e("+n+")+'"),o&&(l+="';"+o+";__p+='"),i&&(l+="'+((__t=("+i+"))==null?'':__t)+'"),r||(r=o||ot
|
||||
.test(n||i)),a=u+t.length,t}),l+="';\n",h||(c="obj",r?l="with("+c+"){"+l+"}":(n=RegExp("(\\(\\s*)"+c+"\\."+c+"\\b","g"),l=l.replace(ht,"$&"+c+".").replace(n,"$1__d"))),l=(r?l.replace(at,""):l).replace(ft,"$1").replace(lt,"$1;"),l="function("+c+"){"+(h?"":c+"||("+c+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(h?"":",__d="+c+"."+c+"||"+c)+";")+l+"return __p}";try{i=o("_","return "+l)(s)}catch(d){throw d.source=l,d}return t?i(t)
|
||||
:(i.source=l,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var f=new Date,l=t-(f-a);return i=arguments,o=this,0>=l?(clearTimeout(u),u=r,a=f,s=e.apply(o,i)):u||(u=setTimeout(n,l)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){return"number"==typeof (e?e.length:0)?en&&A(e)?e.split(""):g(e):M(e)},s.unescape=function(e){return e==r?"":(e+"").replace(ut,y)},s.union=function(
|
||||
){return $(Et.apply(et,arguments))},s.uniq=$,s.uniqueId=function(e){return(e==r?"":e+"")+ ++nt},s.values=M,s.where=function(e,t){var n=bn(t);return P(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},s.without=function(e){for(var t=-1,n=e?e.length:0,r=u(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.wrap=function(e,t){return function(){var n=[e];return Nt.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=e?j(F(arguments
|
||||
,"length")):0,r=Array(n);++t<n;)r[t]=F(arguments,t);return r},s.all=D,s.any=R,s.collect=B,s.detect=H,s.drop=X,s.each=wn,s.extend=cn,s.foldl=I,s.foldr=q,s.head=U,s.include=_,s.inject=I,s.methods=x,s.select=P,s.tail=X,s.take=U,s.unique=$,Q(s),s.prototype.chain=function(){return this},s.prototype.toString=function(){return""+this.__wrapped__},s.prototype.value=G,s.prototype.valueOf=G,wn(["first","last"],function(e){var t=s[e];t&&(s.prototype[e]=function(e,n){var i=t(this.__wrapped__,e,n);return e==r||
|
||||
n?i:new s(i)})}),wn(P(x(s),function(e){return/^(?:bind|contains|every|find|has|is[A-Z].+|reduce.*|some)$/.test(e)}),function(e){var t=s[e];s.prototype[e]=function(){var e=[this.__wrapped__];return Nt.apply(e,arguments),t.apply(s,e)}}),wn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=et[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Gt&&e.length===0&&delete e[0],this}}),wn(["concat","join","slice"],function(e){var t=et[e];s.prototype[e]=
|
||||
function(){var e=t.apply(this.__wrapped__,arguments);return new s(e)}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):Y?"object"==typeof module&&module&&module.exports==Y?(module.exports=s)._=s:Y._=s:e._=s})(this);
|
||||
e)return i;var t=e.valueOf,n="function"==typeof t&&(n=xt(t))&&xt(n);return n?e==n||xt(e)==n&&!b(e):w(e)}:w,bn=_t?function(e){return"function"==typeof e&&Ct.call(e,"prototype")?E(e):k(e)?_t(e):[]}:E,wn=h(fn);s.assign=cn,s.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=x(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=J(e[i],e)}return e},s.chain=function(e){return new s(e)},s.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},s.countBy=function(e,t,n
|
||||
){var r={},t=c(t,n);return wn(e,function(e,n,i){n=t(e,n,i),Tt.call(r,n)?r[n]++:r[n]=1}),r},s.defaults=mn,s.difference=function(e){for(var t=-1,n=e?e.length:0,r=Et.apply(et,arguments),r=u(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.filter=P,s.flatten=z,s.forEach=wn,s.forIn=hn,s.forOwn=pn,s.functions=x,s.groupBy=function(e,t,n){var r={},t=c(t,n);return wn(e,function(e,n,i){n=t(e,n,i),(Tt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},s.initial=function(e,t,n){if(!e)return[];var i=e.length;return g
|
||||
(e,0,Pt(Dt(0,i-(t==r||n?1:t||0)),i))},s.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return wn(e,function(e){if(0>W(i,e)){for(var s=n;--s;)if(!(r[s]||(r[s]=u(t[s])))(e))return;i.push(e)}}),i},s.invert=T,s.invoke=function(e,t){var n=g(arguments,2),r="function"==typeof t,i=[];return wn(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.keys=bn,s.map=B,s.max=j,s.merge=O,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!gn(e))t=!t&&A(e)?a:c(t,n),wn(e,function(e,n,i)
|
||||
{n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},s.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},s.omit=function(e,t,n){var r="function"==typeof t,i={};if(r)t=c(t,n);else var s=Et.apply(et,arguments);return hn(e,function(e,n,o){if(r?!t(e,n,o):0>W(s,n,1))i[n]=e}),i},s.pairs=function(e){var t=[];return pn(e,function(e,n){t.push([n,e])}),t},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=Et.apply
|
||||
(et,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=c(t,n),hn(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=F,s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=Dt(0,wt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reject=function(e,t,n){return t=c(t,n),P(e,function(e,n,r){return!t(e,n,r)})},s.rest=X,s.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return wn(e,function(e){var r=St(Ht()*(++t+1));n[t]=n[r],n[r]=e}),n},s.sortBy=function(e,
|
||||
t,n){var r=[],t=c(t,n);wn(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(f);e--;)r[e]=r[e].c;return r},s.tap=function(e,t){return t(e),e},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){return"number"==typeof (e?e.length:0)?en&&A(e)?e.split(""):g(e):M(e)},s.union=function(){return $(Et.apply(et,arguments))},s.uniq=$,s.values=M,s.where=function(e,t){var n=bn(t);return P(e,function(e){for(var r=n.length;r--;){var i=
|
||||
e[n[r]]===t[n[r]];if(!i)break}return!!i})},s.without=function(e){for(var t=-1,n=e?e.length:0,r=u(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.zip=function(e){for(var t=-1,n=e?j(F(arguments,"length")):0,r=Array(n);++t<n;)r[t]=F(arguments,t);return r},s.collect=B,s.drop=X,s.each=wn,s.extend=cn,s.methods=x,s.select=P,s.tail=X,s.unique=$,Q(s),s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=J,s.bindKey=function(e,t){return l(e,t,g
|
||||
(arguments,2))},s.clone=S,s.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=_,s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},s.defer=function(e){var n=g(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},s.delay=function(e,n){var r=g(arguments,2);return setTimeout
|
||||
(function(){e.apply(t,r)},n)},s.escape=function(e){return e==r?"":(e+"").replace(gt,d)},s.every=D,s.find=H,s.has=function(e,t){return e?Tt.call(e,t):i},s.identity=K,s.indexOf=W,s.isArguments=b,s.isArray=gn,s.isBoolean=function(e){return e===n||e===i||kt.call(e)==Ft},s.isDate=function(e){return kt.call(e)==It},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=kt.call(e),s=e.length;return r==jt||r==zt||r==Bt||Zt&&b(e)||r==Rt&&"number"==typeof s&&C
|
||||
(e.splice)?!s:(pn(e,function(){return t=i}),t)},s.isEqual=N,s.isFinite=function(e){return Ot(e)&&!Mt(parseFloat(e))},s.isFunction=C,s.isNaN=function(e){return L(e)&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=L,s.isObject=k,s.isPlainObject=yn,s.isRegExp=function(e){return kt.call(e)==Ut},s.isString=A,s.isUndefined=function(e){return"undefined"==typeof e},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?Dt(0,r+n):Pt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1
|
||||
},s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Tt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.mixin=Q,s.noConflict=function(){return e._=st,this},s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.partial=function(e){return l(e,g(arguments,1))},s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+St(Ht()*((+t||0)-e+1))},s.reduce=I,s.reduceRight=q,s.result=function(e,
|
||||
t){var n=e?e[t]:r;return C(n)?e[t]():n},s.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:bn(e).length},s.some=R,s.sortedIndex=V,s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,u=s.templateSettings,a=0,f=n.interpolate||u.interpolate||mt,l="__p+='",c=n.variable||u.variable,h=c;e.replace(RegExp((n.escape||u.escape||mt).source+"|"+f.source+"|"+(f===vt?dt:mt).source+"|"+(n.evaluate||u.evaluate||mt).source+"|$","g"),function(t,n,i,s,o,u){return i||(i=s),l+=e.slice(a,u).replace(yt
|
||||
,p),n&&(l+="'+__e("+n+")+'"),o&&(l+="';"+o+";__p+='"),i&&(l+="'+((__t=("+i+"))==null?'':__t)+'"),r||(r=o||ot.test(n||i)),a=u+t.length,t}),l+="';\n",h||(c="obj",r?l="with("+c+"){"+l+"}":(n=RegExp("(\\(\\s*)"+c+"\\."+c+"\\b","g"),l=l.replace(ht,"$&"+c+".").replace(n,"$1__d"))),l=(r?l.replace(at,""):l).replace(ft,"$1").replace(lt,"$1;"),l="function("+c+"){"+(h?"":c+"||("+c+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(h?"":",__d="+
|
||||
c+"."+c+"||"+c)+";")+l+"return __p}";try{i=o("_","return "+l)(s)}catch(d){throw d.source=l,d}return t?i(t):(i.source=l,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var f=new Date,l=t-(f-a);return i=arguments,o=this,0>=l?(clearTimeout(u),u=r,a=f,s=e.apply(o,i)):u||(u=setTimeout(n,l)),s}},s.unescape=function(e){return e==r?"":(e+"").replace(ut,y)},s.uniqueId=function(e){return(e==r?"":e+"")+ ++nt},s.wrap=function(e,t){return function(){var n=
|
||||
[e];return Nt.apply(n,arguments),t.apply(this,n)}},s.all=D,s.any=R,s.detect=H,s.foldl=I,s.foldr=q,s.include=_,s.inject=I,pn(s,function(e,t){s.prototype[t]||(s.prototype[t]=function(){var t=[this.__wrapped__];return Nt.apply(t,arguments),e.apply(s,t)})}),s.first=U,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:g(e,Dt(0,i-t))}},s.take=U,s.head=U,pn(s,function(e,t){s.prototype[t]||(s.prototype[t]=function(t,n){var i=e(this.__wrapped__,t,n);return t==r||n?i:new s(i)})}),s.VERSION="1.0.0-rc.2"
|
||||
,s.prototype.chain=function(){return this},s.prototype.toString=function(){return""+this.__wrapped__},s.prototype.value=G,s.prototype.valueOf=G,wn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=et[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Gt&&e.length===0&&delete e[0],this}}),wn(["concat","join","slice"],function(e){var t=et[e];s.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return new s(e)}}),typeof define=="function"&&typeof
|
||||
define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):Y?"object"==typeof module&&module&&module.exports==Y?(module.exports=s)._=s:Y._=s:e._=s})(this);
|
||||
@@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* Lo-Dash 1.0.0-rc.1 (Custom Build) <http://lodash.com>
|
||||
* Lo-Dash 1.0.0-rc.2 (Custom Build) <http://lodash.com>
|
||||
* Build: `lodash underscore -d -o ./lodash.underscore.js`
|
||||
* (c) 2012 John-David Dalton <http://allyoucanleet.com/>
|
||||
* Based on Underscore.js 1.4.2 <http://underscorejs.org>
|
||||
* Based on Underscore.js 1.4.3 <http://underscorejs.org>
|
||||
* (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
||||
* Available under MIT license <http://lodash.com/license>
|
||||
*/
|
||||
@@ -133,7 +133,6 @@
|
||||
var hasObjectSpliceBug = (hasObjectSpliceBug = { '0': 1, 'length': 1 },
|
||||
arrayRef.splice.call(hasObjectSpliceBug, 0, 1), hasObjectSpliceBug[0]);
|
||||
|
||||
|
||||
/**
|
||||
* Detect lack of support for accessing string characters by index:
|
||||
*
|
||||
@@ -615,7 +614,6 @@
|
||||
for (index in iteratee) {
|
||||
if (callback(iteratee[index], index, collection) === indicatorObject) return result;
|
||||
}
|
||||
;
|
||||
return result
|
||||
};
|
||||
|
||||
@@ -649,7 +647,6 @@
|
||||
if (callback(iteratee[index], index, collection) === indicatorObject) return result;
|
||||
}
|
||||
}
|
||||
;
|
||||
return result
|
||||
};
|
||||
|
||||
@@ -765,6 +762,7 @@
|
||||
? (isArray(value) ? slice(value) : assign({}, value))
|
||||
: value
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns own enumerable properties of source object(s) to the `destination`
|
||||
* object for all `destination` properties that resolve to `null`/`undefined`.
|
||||
@@ -799,6 +797,7 @@
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a sorted array of all enumerable properties, own and inherited,
|
||||
* of `object` that have function values.
|
||||
@@ -970,6 +969,7 @@
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a deep comparison between two values to determine if they are
|
||||
* equivalent to each other.
|
||||
@@ -1140,8 +1140,9 @@
|
||||
* // => false
|
||||
*/
|
||||
function isFinite(value) {
|
||||
return nativeIsFinite(value) && toString.call(value) == numberClass;
|
||||
return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a function.
|
||||
*
|
||||
@@ -1365,6 +1366,7 @@
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a two dimensional array of the given object's key-value pairs,
|
||||
* i.e. `[[key1, value1], [key2, value2]]`.
|
||||
@@ -1426,6 +1428,7 @@
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array composed of the own enumerable property values of `object`.
|
||||
*
|
||||
@@ -1488,6 +1491,7 @@
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an object composed of keys returned from running each element of
|
||||
* `collection` through a `callback`. The corresponding value of each key is
|
||||
@@ -1677,7 +1681,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
};
|
||||
|
||||
@@ -2252,6 +2255,7 @@
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the first element of the `array`. Pass `n` to return the first `n`
|
||||
* elements of the `array`.
|
||||
@@ -2417,6 +2421,7 @@
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last element of the `array`. Pass `n` to return the last `n`
|
||||
* elements of the `array`.
|
||||
@@ -2691,6 +2696,11 @@
|
||||
result = [],
|
||||
seen = result;
|
||||
|
||||
if (typeof isSorted == 'function') {
|
||||
thisArg = callback;
|
||||
callback = isSorted;
|
||||
isSorted = false;
|
||||
}
|
||||
if (callback) {
|
||||
seen = [];
|
||||
callback = createCallback(callback, thisArg);
|
||||
@@ -2711,6 +2721,7 @@
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array with all occurrences of the passed values removed using
|
||||
* strict equality for comparisons, i.e. `===`.
|
||||
@@ -2739,6 +2750,7 @@
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Groups the elements of each array at their corresponding indexes. Useful for
|
||||
* separate data sources that are coordinated through matching array indexes.
|
||||
@@ -3411,6 +3423,7 @@
|
||||
result.source = source;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the `callback` function `n` times, returning an array of the results
|
||||
* of each `callback` execution. The `callback` is bound to `thisArg` and invoked
|
||||
@@ -3481,9 +3494,10 @@
|
||||
* // => '105'
|
||||
*/
|
||||
function uniqueId(prefix) {
|
||||
var id = idCounter++;
|
||||
var id = ++idCounter + '';
|
||||
return prefix ? prefix + id : id;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
@@ -3513,6 +3527,7 @@
|
||||
value.__chain__ = true;
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes `interceptor` with the `value` as the first argument, and then
|
||||
* returns `value`. The purpose of this method is to "tap into" a method chain,
|
||||
@@ -3561,6 +3576,7 @@
|
||||
this.__chain__ = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Produces the `toString` result of the wrapped value.
|
||||
*
|
||||
@@ -3596,44 +3612,72 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The semantic version number.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type String
|
||||
*/
|
||||
lodash.VERSION = '1.0.0-rc.1';
|
||||
lodash.after = after;
|
||||
lodash.bind = bind;
|
||||
lodash.bindAll = bindAll;
|
||||
lodash.chain = chain;
|
||||
lodash.clone = clone;
|
||||
lodash.compact = compact;
|
||||
lodash.compose = compose;
|
||||
lodash.contains = contains;
|
||||
lodash.countBy = countBy;
|
||||
lodash.debounce = debounce;
|
||||
lodash.defaults = defaults;
|
||||
lodash.defer = defer;
|
||||
lodash.delay = delay;
|
||||
lodash.difference = difference;
|
||||
lodash.escape = escape;
|
||||
lodash.every = every;
|
||||
lodash.filter = filter;
|
||||
lodash.find = find;
|
||||
lodash.first = first;
|
||||
lodash.flatten = flatten;
|
||||
lodash.forEach = forEach;
|
||||
lodash.functions = functions;
|
||||
lodash.groupBy = groupBy;
|
||||
lodash.has = has;
|
||||
lodash.identity = identity;
|
||||
lodash.indexOf = indexOf;
|
||||
lodash.initial = initial;
|
||||
lodash.intersection = intersection;
|
||||
lodash.invert = invert;
|
||||
lodash.invoke = invoke;
|
||||
lodash.keys = keys;
|
||||
lodash.map = map;
|
||||
lodash.max = max;
|
||||
lodash.min = min;
|
||||
lodash.object = object;
|
||||
lodash.omit = omit;
|
||||
lodash.pairs = pairs;
|
||||
lodash.pick = pick;
|
||||
lodash.pluck = pluck;
|
||||
lodash.range = range;
|
||||
lodash.reject = reject;
|
||||
lodash.rest = rest;
|
||||
lodash.shuffle = shuffle;
|
||||
lodash.sortBy = sortBy;
|
||||
lodash.tap = tap;
|
||||
lodash.times = times;
|
||||
lodash.toArray = toArray;
|
||||
lodash.union = union;
|
||||
lodash.uniq = uniq;
|
||||
lodash.values = values;
|
||||
lodash.where = where;
|
||||
lodash.without = without;
|
||||
lodash.zip = zip;
|
||||
|
||||
// add aliases
|
||||
lodash.collect = map;
|
||||
lodash.drop = rest;
|
||||
lodash.each = forEach;
|
||||
lodash.extend = assign;
|
||||
lodash.methods = functions;
|
||||
lodash.select = filter;
|
||||
lodash.tail = rest;
|
||||
lodash.unique = uniq;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// add functions that return unwrapped values when chaining
|
||||
lodash.after = after;
|
||||
lodash.bind = bind;
|
||||
lodash.clone = clone;
|
||||
lodash.compose = compose;
|
||||
lodash.contains = contains;
|
||||
lodash.debounce = debounce;
|
||||
lodash.defer = defer;
|
||||
lodash.delay = delay;
|
||||
lodash.escape = escape;
|
||||
lodash.every = every;
|
||||
lodash.find = find;
|
||||
lodash.has = has;
|
||||
lodash.identity = identity;
|
||||
lodash.indexOf = indexOf;
|
||||
lodash.isArray = isArray;
|
||||
lodash.isBoolean = isBoolean;
|
||||
lodash.isDate = isDate;
|
||||
@@ -3649,87 +3693,70 @@
|
||||
lodash.isRegExp = isRegExp;
|
||||
lodash.isString = isString;
|
||||
lodash.isUndefined = isUndefined;
|
||||
lodash.keys = keys;
|
||||
lodash.last = last;
|
||||
lodash.lastIndexOf = lastIndexOf;
|
||||
lodash.map = map;
|
||||
lodash.max = max;
|
||||
lodash.memoize = memoize;
|
||||
lodash.min = min;
|
||||
lodash.mixin = mixin;
|
||||
lodash.noConflict = noConflict;
|
||||
lodash.object = object;
|
||||
lodash.omit = omit;
|
||||
lodash.once = once;
|
||||
lodash.pairs = pairs;
|
||||
lodash.pick = pick;
|
||||
lodash.pluck = pluck;
|
||||
lodash.random = random;
|
||||
lodash.range = range;
|
||||
lodash.reduce = reduce;
|
||||
lodash.reduceRight = reduceRight;
|
||||
lodash.reject = reject;
|
||||
lodash.rest = rest;
|
||||
lodash.result = result;
|
||||
lodash.shuffle = shuffle;
|
||||
lodash.size = size;
|
||||
lodash.some = some;
|
||||
lodash.sortBy = sortBy;
|
||||
lodash.sortedIndex = sortedIndex;
|
||||
lodash.tap = tap;
|
||||
lodash.template = template;
|
||||
lodash.throttle = throttle;
|
||||
lodash.times = times;
|
||||
lodash.toArray = toArray;
|
||||
lodash.unescape = unescape;
|
||||
lodash.union = union;
|
||||
lodash.uniq = uniq;
|
||||
lodash.uniqueId = uniqueId;
|
||||
lodash.values = values;
|
||||
lodash.where = where;
|
||||
lodash.without = without;
|
||||
lodash.wrap = wrap;
|
||||
lodash.zip = zip;
|
||||
|
||||
// assign aliases
|
||||
// add aliases
|
||||
lodash.all = every;
|
||||
lodash.any = some;
|
||||
lodash.collect = map;
|
||||
lodash.detect = find;
|
||||
lodash.drop = rest;
|
||||
lodash.each = forEach;
|
||||
lodash.extend = assign;
|
||||
lodash.foldl = reduce;
|
||||
lodash.foldr = reduceRight;
|
||||
lodash.head = first;
|
||||
lodash.include = contains;
|
||||
lodash.inject = reduce;
|
||||
lodash.methods = functions;
|
||||
lodash.select = filter;
|
||||
lodash.tail = rest;
|
||||
lodash.take = first;
|
||||
lodash.unique = uniq;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// add all static functions to `lodash.prototype`
|
||||
// add functions capable of returning wrapped and unwrapped values when chaining
|
||||
lodash.first = first;
|
||||
lodash.last = last;
|
||||
|
||||
// add aliases
|
||||
lodash.take = first;
|
||||
lodash.head = first;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The semantic version number.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type String
|
||||
*/
|
||||
lodash.VERSION = '1.0.0-rc.2';
|
||||
|
||||
// add functions to `lodash.prototype`
|
||||
mixin(lodash);
|
||||
|
||||
// add `lodash.prototype.chain` after calling `mixin()` to avoid overwriting
|
||||
// it with the wrapped `lodash.chain`
|
||||
// add "Chaining" functions to the wrapper
|
||||
lodash.prototype.chain = wrapperChain;
|
||||
lodash.prototype.value = wrapperValueOf;
|
||||
|
||||
// add all mutator Array functions to the wrapper.
|
||||
// add mutator `Array` functions to the wrapper
|
||||
forEach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
|
||||
lodash.prototype[methodName] = function() {
|
||||
var value = this.__wrapped__;
|
||||
func.apply(value, arguments);
|
||||
|
||||
// avoid array-like object bugs with `Array#shift` and `Array#splice` in
|
||||
// Firefox < 10 and IE < 9
|
||||
// avoid array-like object bugs with `Array#shift` and `Array#splice`
|
||||
// in Firefox < 10 and IE < 9
|
||||
if (hasObjectSpliceBug && value.length === 0) {
|
||||
delete value[0];
|
||||
}
|
||||
@@ -3737,10 +3764,9 @@
|
||||
};
|
||||
});
|
||||
|
||||
// add all accessor Array functions to the wrapper.
|
||||
// add accessor `Array` functions to the wrapper
|
||||
forEach(['concat', 'join', 'slice'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
|
||||
lodash.prototype[methodName] = function() {
|
||||
var value = this.__wrapped__,
|
||||
result = func.apply(value, arguments);
|
||||
|
||||
56
lodash.underscore.min.js
vendored
56
lodash.underscore.min.js
vendored
@@ -1,33 +1,33 @@
|
||||
/*!
|
||||
Lo-Dash 1.0.0-rc.1 (Custom Build) lodash.com/license
|
||||
Lo-Dash 1.0.0-rc.2 (Custom Build) lodash.com/license
|
||||
Build: `lodash underscore -m -o ./lodash.underscore.min.js`
|
||||
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
||||
Underscore.js 1.4.3 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(e,t){function n(e){if(e&&"object"==typeof e&&e.__wrapped__)return e;if(!(this instanceof n))return new n(e);this.__wrapped__=e}function r(e,t){var n=e.b,r=t.b,e=e.a,t=t.a;if(e!==t){if(e>t||"undefined"==typeof e)return 1;if(e<t||"undefined"==typeof t)return-1}return n<r?-1:1}function i(e,t,n){function r(){var i=arguments,s=t;return n.length&&(i=i.length?n.concat(f(i)):n),this instanceof r?(a.prototype=e.prototype,s=new a,a.prototype=null,i=e.apply(s,i),y(i)?i:s):e.apply(s,i)}return r}function s
|
||||
(e,t){return e?"function"!=typeof e?function(t){return t[e]}:"undefined"!=typeof t?function(n,r,i){return e.call(t,n,r,i)}:e:I}function o(e){return"\\"+Et[e]}function u(e){return Tt[e]}function a(){}function f(e,t,n){t||(t=0),"undefined"==typeof n&&(n=e?e.length:0);for(var r=-1,n=n-t||0,i=Array(0>n?0:n);++r<n;)i[r]=e[t+r];return i}function l(e){return Nt[e]}function c(e){if(!e)return e;for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];if(r)for(var i in r)e[i]=r[i]}return e}function h(e){
|
||||
var t=[];return xt(e,function(e,n){t.push(n)}),t}function p(e){if(!e)return e;for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];if(r)for(var i in r)null==e[i]&&(e[i]=r[i])}return e}function d(e){var t=[];return St(e,function(e,n){g(e)&&t.push(n)}),t.sort()}function v(e){var t={};return xt(e,function(e,n){t[e]=n}),t}function m(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;var i=rt.call(e),s=rt.call(t);if(i!=s)return!1;switch(i){case ht:case pt:return+e==+t;case dt
|
||||
:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case mt:case gt:return e==t+""}s=i==ct;if(!s){if(e.__wrapped__||t.__wrapped__)return m(e.__wrapped__||e,t.__wrapped__||t);if(i!=vt)return!1;var i=e.constructor,o=t.constructor;if(i!=o&&(!g(i)||!(i instanceof i&&g(o)&&o instanceof o)))return!1}n||(n=[]),r||(r=[]);for(i=n.length;i--;)if(n[i]==e)return r[i]==t;var u=!0,a=0;n.push(e),r.push(t);if(s){a=e.length;if(u=a==t.length)for(;a--&&(u=m(e[a],t[a],n,r)););return u}return St(e,function(e,i,s){if(tt.call(s,i)
|
||||
)return a++,!(u=tt.call(t,i)&&m(e,t[i],n,r))&&X}),u&&St(t,function(e,t,n){if(tt.call(n,t))return!(u=-1<--a)&&X}),u}function g(e){return"function"==typeof e}function y(e){return e?wt[typeof e]:!1}function b(e){return"number"==typeof e||rt.call(e)==dt}function w(e){return"string"==typeof e||rt.call(e)==gt}function E(e){var t=[];return xt(e,function(e){t.push(e)}),t}function S(e,t){var n=!1;return"number"==typeof (e?e.length:0)?n=-1<P(e,t):Lt(e,function(e){return(n=e===t)&&X}),n}function x(e,t,n){var r=!0
|
||||
,t=s(t,n);if(Ct(e))for(var n=-1,i=e.length;++n<i&&(r=!!t(e[n],n,e)););else Lt(e,function(e,n,i){return!(r=!!t(e,n,i))&&X});return r}function T(e,t,n){var r=[],t=s(t,n);if(Ct(e))for(var n=-1,i=e.length;++n<i;){var o=e[n];t(o,n,e)&&r.push(o)}else Lt(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function N(e,t,n){var r,t=s(t,n);return Lt(e,function(e,n,i){if(t(e,n,i))return r=e,X}),r}function C(e,t,n){var r=-1,i=e?e.length:0,o=Array("number"==typeof i?i:0),t=s(t,n);if(Ct(e))for(;++r<i;)o[r]=t(e[r
|
||||
],r,e);else Lt(e,function(e,n,i){o[++r]=t(e,n,i)});return o}function k(e,t,n){var r=-Infinity,i=-1,o=e?e.length:0,u=r;if(t||!Ct(e))t=s(t,n),Lt(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,u=e)});else for(;++i<o;)e[i]>u&&(u=e[i]);return u}function L(e,t){return C(e,t+"")}function A(e,t,n,r){var i=3>arguments.length;return t||(t=I),Lt(e,function(e,s,o){n=i?(i=!1,e):t.call(r,n,e,s,o)}),n}function O(e,t,n,r){var i=e?e.length:0,s=3>arguments.length;if("number"!=typeof i)var o=kt(e),i=o.length;return t||(t=I
|
||||
),Lt(e,function(u,a,f){a=o?o[--i]:--i,n=s?(s=!1,e[a]):t.call(r,n,e[a],a,f)}),n}function M(e,t,n){var r,t=s(t,n);if(Ct(e))for(var n=-1,i=e.length;++n<i&&!(r=t(e[n],n,e)););else Lt(e,function(e,n,i){return(r=t(e,n,i))&&X});return!!r}function _(e,t,n){if(e){var r=e.length;return null==t||n?e[0]:f(e,0,ft(at(0,t),r))}}function D(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];Ct(s)?nt.apply(i,t?s:D(s)):i.push(s)}return i}function P(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?at
|
||||
(0,i+n):n||0)-1;else if(n)return r=B(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function H(e,t,n){return f(e,null==t||n?1:at(0,t))}function B(e,t,n,r){for(var i=0,o=e?e.length:i,n=n?s(n,r):I,t=n(t);i<o;)r=i+o>>>1,n(e[r])<t?i=r+1:o=r;return i}function j(e,t,n,r){var i=-1,o=e?e.length:0,u=[],a=u;n&&(a=[],n=s(n,r));for(;++i<o;){var r=e[i],f=n?n(r,i,e):r;if(t?!i||a[a.length-1]!==f:0>P(a,f))n&&a.push(f),u.push(r)}return u}function F(e,t){return yt||it&&2<arguments.length?it.call.apply
|
||||
(it,arguments):i(e,t,f(arguments,2))}function I(e){return e}function q(e){Lt(d(e),function(t){var r=n[t]=e[t];n.prototype[t]=function(){var e=[this.__wrapped__];return nt.apply(e,arguments),e=r.apply(n,e),this.__chain__&&(e=new n(e),e.__chain__=!0),e}})}var R="object"==typeof exports&&exports,U="object"==typeof global&&global;U.global===U&&(e=U);var z=[],U=new function(){},W=0,X=U,V=e._,$=/&(?:amp|lt|gt|quot|#x27);/g,J=RegExp("^"+(U.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g
|
||||
,".+?")+"$"),K=/($^)/,Q=/[&<>"']/g,G=/['\n\r\t\u2028\u2029\\]/g,Y=Math.ceil,Z=z.concat,et=Math.floor,tt=U.hasOwnProperty,nt=z.push,rt=U.toString,it=J.test(it=f.bind)&&it,st=J.test(st=Array.isArray)&&st,ot=e.isFinite,ut=J.test(ut=Object.keys)&&ut,at=Math.max,ft=Math.min,lt=Math.random,ct="[object Array]",ht="[object Boolean]",pt="[object Date]",dt="[object Number]",vt="[object Object]",mt="[object RegExp]",gt="[object String]",U=!!e.attachEvent,U=it&&!/\n|true/.test(it+U),yt=it&&!U,bt=(bt={0:1,length
|
||||
:1},z.splice.call(bt,0,1),bt[0]),wt={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,"undefined":!1},Et={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};n.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},n.isArguments=function(e){return"[object Arguments]"==rt.call(e)},n.isArguments(arguments)||(n.isArguments=function(e){return e?tt.call(e,"callee"):!1});var St=function(e,t){var n;if(!e)return e
|
||||
;t||(t=I);for(n in e)if(t(e[n],n,e)===X)break;return e},xt=function(e,t){var n;if(!e)return e;t||(t=I);for(n in e)if(tt.call(e,n)&&t(e[n],n,e)===X)break;return e},Tt={"&":"&","<":"<",">":">",'"':""","'":"'"},Nt=v(Tt),Ct=st||function(e){return rt.call(e)==ct};g(/x/)&&(g=function(e){return"[object Function]"==rt.call(e)});var kt=ut?function(e){return y(e)?ut(e):[]}:h,Lt=function(e,t,n){if(!e)return e;var t=t&&"undefined"==typeof n?t:s(t,n),r=e.length,n=-1;if("number"==typeof r){
|
||||
for(;++n<r;)if(t(e[n],n,e)===X)return e}else for(n in e)if(tt.call(e,n)&&t(e[n],n,e)===X)return e};n.VERSION="1.0.0-rc.1",n.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},n.bind=F,n.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=d(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=F(e[i],e)}return e},n.chain=function(e){return e=new n(e),e.__chain__=!0,e},n.clone=function(e){return e&&wt[typeof e]?Ct(e)?f(e):c({},e):e},n.compact=function(e){for(var t=-1,
|
||||
n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},n.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},n.contains=S,n.countBy=function(e,t,n){var r={},t=s(t,n);return Lt(e,function(e,n,i){n=t(e,n,i),tt.call(r,n)?r[n]++:r[n]=1}),r},n.debounce=function(e,t,n){function r(){u=null,n||(s=e.apply(o,i))}var i,s,o,u;return function(){var a=n&&!u;return i=arguments,o=this,clearTimeout(u),u=setTimeout(r,t),a&&(s=e.apply(
|
||||
o,i)),s}},n.defaults=p,n.defer=function(e){var n=f(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},n.delay=function(e,n){var r=f(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},n.difference=function(e){for(var t=-1,n=e.length,r=Z.apply(z,arguments),i=[];++t<n;){var s=e[t];0>P(r,s,n)&&i.push(s)}return i},n.escape=function(e){return null==e?"":(e+"").replace(Q,u)},n.every=x,n.filter=T,n.find=N,n.first=_,n.flatten=D,n.forEach=Lt,n.functions=d,n.groupBy=function(e,t,n){var r={
|
||||
},t=s(t,n);return Lt(e,function(e,n,i){n=t(e,n,i),(tt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},n.has=function(e,t){return e?tt.call(e,t):!1},n.identity=I,n.indexOf=P,n.initial=function(e,t,n){if(!e)return[];var r=e.length;return f(e,0,ft(at(0,r-(null==t||n?1:t||0)),r))},n.intersection=function(e){var t=arguments,n=t.length,r=[];return Lt(e,function(e){if(0>P(r,e)){for(var i=n;--i;)if(0>P(t[i],e))return;r.push(e)}}),r},n.invert=v,n.invoke=function(e,t){var n=f(arguments,2),r="function"==typeof t,i=[];
|
||||
return Lt(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},n.isArray=Ct,n.isBoolean=function(e){return!0===e||!1===e||rt.call(e)==ht},n.isDate=function(e){return rt.call(e)==pt},n.isElement=function(e){return e?1===e.nodeType:!1},n.isEmpty=function(e){if(!e)return!0;if(Ct(e)||w(e))return!e.length;for(var t in e)if(tt.call(e,t))return!1;return!0},n.isEqual=m,n.isFinite=function(e){return ot(e)&&rt.call(e)==dt},n.isFunction=g,n.isNaN=function(e){return b(e)&&e!=+e},n.isNull=function(e){return null===
|
||||
e},n.isNumber=b,n.isObject=y,n.isRegExp=function(e){return rt.call(e)==mt},n.isString=w,n.isUndefined=function(e){return"undefined"==typeof e},n.keys=kt,n.last=function(e,t,n){if(e){var r=e.length;return null==t||n?e[r-1]:f(e,at(0,r-t))}},n.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?at(0,r+n):ft(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},n.map=C,n.max=k,n.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return tt
|
||||
.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},n.min=function(e,t,n){var r=Infinity,i=-1,o=e?e.length:0,u=r;if(t||!Ct(e))t=s(t,n),Lt(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,u=e)});else for(;++i<o;)e[i]<u&&(u=e[i]);return u},n.mixin=q,n.noConflict=function(){return e._=V,this},n.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},n.omit=function(e){var t=Z.apply(z,arguments),n={};return St(e,function(e,r){0>P(t,r,1)&&(n[r]=e)}),n},n.once=function(
|
||||
e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},n.pairs=function(e){var t=[];return xt(e,function(e,n){t.push([n,e])}),t},n.pick=function(e){for(var t=0,n=Z.apply(z,arguments),r=n.length,i={};++t<r;){var s=n[t];s in e&&(i[s]=e[s])}return i},n.pluck=L,n.random=function(e,t){return null==e&&null==t&&(t=1),e=+e||0,null==t&&(t=e,e=0),e+et(lt()*((+t||0)-e+1))},n.range=function(e,t,n){e=+e||0,n=+n||1,null==t&&(t=e,e=0);for(var r=-1,t=at(0,Y((t-e)/n)),i=Array(t);++
|
||||
r<t;)i[r]=e,e+=n;return i},n.reduce=A,n.reduceRight=O,n.reject=function(e,t,n){return t=s(t,n),T(e,function(e,n,r){return!t(e,n,r)})},n.rest=H,n.result=function(e,t){var n=e?e[t]:null;return g(n)?e[t]():n},n.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return Lt(e,function(e){var r=et(lt()*(++t+1));n[t]=n[r],n[r]=e}),n},n.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:kt(e).length},n.some=M,n.sortBy=function(e,t,n){var i=[],t=s(t,n);Lt(e,function(e,n,r){i.push({a:t(e,n,r),b:
|
||||
n,c:e})}),e=i.length;for(i.sort(r);e--;)i[e]=i[e].c;return i},n.sortedIndex=B,n.tap=function(e,t){return t(e),e},n.template=function(e,t,r){e||(e="");var r=p({},r,n.templateSettings),i=0,s="__p+='",u=r.variable;e.replace(RegExp((r.escape||K).source+"|"+(r.interpolate||K).source+"|"+(r.evaluate||K).source+"|$","g"),function(t,n,r,u,a){s+=e.slice(i,a).replace(G,o),s+=n?"'+_['escape']("+n+")+'":u?"';"+u+";__p+='":r?"'+((__t=("+r+"))==null?'':__t)+'":"",i=a+t.length}),s+="';\n",u||(u="obj",s="with("+
|
||||
u+"||{}){"+s+"}"),s="function("+u+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+s+"return __p}";try{var a=Function("_","return "+s)(n)}catch(f){throw f.source=s,f}return t?a(t):(a.source=s,a)},n.throttle=function(e,t){function n(){u=new Date,o=null,i=e.apply(s,r)}var r,i,s,o,u=0;return function(){var a=new Date,f=t-(a-u);return r=arguments,s=this,0>=f?(clearTimeout(o),o=null,u=a,i=e.apply(s,r)):o||(o=setTimeout(n,f)),i}},n.times=function(e,t,n){for(var e=+
|
||||
e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},n.toArray=function(e){return"number"==typeof (e?e.length:0)?f(e):E(e)},n.unescape=function(e){return null==e?"":(e+"").replace($,l)},n.union=function(){return j(Z.apply(z,arguments))},n.uniq=j,n.uniqueId=function(e){var t=W++;return e?e+t:t},n.values=E,n.where=function(e,t){var n=kt(t);return T(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},n.without=function(e){for(var t=-1,n=e.length,r=[];++t<n;){var i=
|
||||
e[t];0>P(arguments,i,1)&&r.push(i)}return r},n.wrap=function(e,t){return function(){var n=[e];return nt.apply(n,arguments),t.apply(this,n)}},n.zip=function(e){for(var t=-1,n=e?k(L(arguments,"length")):0,r=Array(n);++t<n;)r[t]=L(arguments,t);return r},n.all=x,n.any=M,n.collect=C,n.detect=N,n.drop=H,n.each=Lt,n.extend=c,n.foldl=A,n.foldr=O,n.head=_,n.include=S,n.inject=A,n.methods=d,n.select=T,n.tail=H,n.take=_,n.unique=j,q(n),n.prototype.chain=function(){return this.__chain__=!0,this},n.prototype.
|
||||
value=function(){return this.__wrapped__},Lt("pop push reverse shift sort splice unshift".split(" "),function(e){var t=z[e];n.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),bt&&e.length===0&&delete e[0],this}}),Lt(["concat","join","slice"],function(e){var t=z[e];n.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new n(e),e.__chain__=!0),e}}),R?"object"==typeof module&&module&&module.exports==R?(module.exports=n)._=n:R._=n:e._=
|
||||
(e,t){return e?"function"!=typeof e?function(t){return t[e]}:"undefined"!=typeof t?function(n,r,i){return e.call(t,n,r,i)}:e:I}function o(e){return"\\"+St[e]}function u(e){return Nt[e]}function a(){}function f(e,t,n){t||(t=0),"undefined"==typeof n&&(n=e?e.length:0);for(var r=-1,n=n-t||0,i=Array(0>n?0:n);++r<n;)i[r]=e[t+r];return i}function l(e){return Ct[e]}function c(e){if(!e)return e;for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];if(r)for(var i in r)e[i]=r[i]}return e}function h(e){
|
||||
var t=[];return Tt(e,function(e,n){t.push(n)}),t}function p(e){if(!e)return e;for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];if(r)for(var i in r)null==e[i]&&(e[i]=r[i])}return e}function d(e){var t=[];return xt(e,function(e,n){g(e)&&t.push(n)}),t.sort()}function v(e){var t={};return Tt(e,function(e,n){t[e]=n}),t}function m(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;var i=rt.call(e),s=rt.call(t);if(i!=s)return!1;switch(i){case pt:case dt:return+e==+t;case vt
|
||||
:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case gt:case yt:return e==t+""}s=i==ht;if(!s){if(e.__wrapped__||t.__wrapped__)return m(e.__wrapped__||e,t.__wrapped__||t);if(i!=mt)return!1;var i=e.constructor,o=t.constructor;if(i!=o&&(!g(i)||!(i instanceof i&&g(o)&&o instanceof o)))return!1}n||(n=[]),r||(r=[]);for(i=n.length;i--;)if(n[i]==e)return r[i]==t;var u=!0,a=0;n.push(e),r.push(t);if(s){a=e.length;if(u=a==t.length)for(;a--&&(u=m(e[a],t[a],n,r)););return u}return xt(e,function(e,i,s){if(tt.call(s,i)
|
||||
)return a++,!(u=tt.call(t,i)&&m(e,t[i],n,r))&&X}),u&&xt(t,function(e,t,n){if(tt.call(n,t))return!(u=-1<--a)&&X}),u}function g(e){return"function"==typeof e}function y(e){return e?Et[typeof e]:!1}function b(e){return"number"==typeof e||rt.call(e)==vt}function w(e){return"string"==typeof e||rt.call(e)==yt}function E(e){var t=[];return Tt(e,function(e){t.push(e)}),t}function S(e,t){var n=!1;return"number"==typeof (e?e.length:0)?n=-1<P(e,t):At(e,function(e){return(n=e===t)&&X}),n}function x(e,t,n){var r=!0
|
||||
,t=s(t,n);if(kt(e))for(var n=-1,i=e.length;++n<i&&(r=!!t(e[n],n,e)););else At(e,function(e,n,i){return!(r=!!t(e,n,i))&&X});return r}function T(e,t,n){var r=[],t=s(t,n);if(kt(e))for(var n=-1,i=e.length;++n<i;){var o=e[n];t(o,n,e)&&r.push(o)}else At(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function N(e,t,n){var r,t=s(t,n);return At(e,function(e,n,i){if(t(e,n,i))return r=e,X}),r}function C(e,t,n){var r=-1,i=e?e.length:0,o=Array("number"==typeof i?i:0),t=s(t,n);if(kt(e))for(;++r<i;)o[r]=t(e[r
|
||||
],r,e);else At(e,function(e,n,i){o[++r]=t(e,n,i)});return o}function k(e,t,n){var r=-Infinity,i=-1,o=e?e.length:0,u=r;if(t||!kt(e))t=s(t,n),At(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,u=e)});else for(;++i<o;)e[i]>u&&(u=e[i]);return u}function L(e,t){return C(e,t+"")}function A(e,t,n,r){var i=3>arguments.length;return t||(t=I),At(e,function(e,s,o){n=i?(i=!1,e):t.call(r,n,e,s,o)}),n}function O(e,t,n,r){var i=e?e.length:0,s=3>arguments.length;if("number"!=typeof i)var o=Lt(e),i=o.length;return t||(t=I
|
||||
),At(e,function(u,a,f){a=o?o[--i]:--i,n=s?(s=!1,e[a]):t.call(r,n,e[a],a,f)}),n}function M(e,t,n){var r,t=s(t,n);if(kt(e))for(var n=-1,i=e.length;++n<i&&!(r=t(e[n],n,e)););else At(e,function(e,n,i){return(r=t(e,n,i))&&X});return!!r}function _(e,t,n){if(e){var r=e.length;return null==t||n?e[0]:f(e,0,lt(ft(0,t),r))}}function D(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];kt(s)?nt.apply(i,t?s:D(s)):i.push(s)}return i}function P(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?ft
|
||||
(0,i+n):n||0)-1;else if(n)return r=B(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function H(e,t,n){return f(e,null==t||n?1:ft(0,t))}function B(e,t,n,r){for(var i=0,o=e?e.length:i,n=n?s(n,r):I,t=n(t);i<o;)r=i+o>>>1,n(e[r])<t?i=r+1:o=r;return i}function j(e,t,n,r){var i=-1,o=e?e.length:0,u=[],a=u;"function"==typeof t&&(r=n,n=t,t=!1),n&&(a=[],n=s(n,r));for(;++i<o;){var r=e[i],f=n?n(r,i,e):r;if(t?!i||a[a.length-1]!==f:0>P(a,f))n&&a.push(f),u.push(r)}return u}function F(e,t){return bt||
|
||||
it&&2<arguments.length?it.call.apply(it,arguments):i(e,t,f(arguments,2))}function I(e){return e}function q(e){At(d(e),function(t){var r=n[t]=e[t];n.prototype[t]=function(){var e=[this.__wrapped__];return nt.apply(e,arguments),e=r.apply(n,e),this.__chain__&&(e=new n(e),e.__chain__=!0),e}})}var R="object"==typeof exports&&exports,U="object"==typeof global&&global;U.global===U&&(e=U);var z=[],U=new function(){},W=0,X=U,V=e._,$=/&(?:amp|lt|gt|quot|#x27);/g,J=RegExp("^"+(U.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g
|
||||
,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),K=/($^)/,Q=/[&<>"']/g,G=/['\n\r\t\u2028\u2029\\]/g,Y=Math.ceil,Z=z.concat,et=Math.floor,tt=U.hasOwnProperty,nt=z.push,rt=U.toString,it=J.test(it=f.bind)&&it,st=J.test(st=Array.isArray)&&st,ot=e.isFinite,ut=e.isNaN,at=J.test(at=Object.keys)&&at,ft=Math.max,lt=Math.min,ct=Math.random,ht="[object Array]",pt="[object Boolean]",dt="[object Date]",vt="[object Number]",mt="[object Object]",gt="[object RegExp]",yt="[object String]",U=!!e.attachEvent,U=it&&!/\n|true/
|
||||
.test(it+U),bt=it&&!U,wt=(wt={0:1,length:1},z.splice.call(wt,0,1),wt[0]),Et={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,"undefined":!1},St={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};n.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},n.isArguments=function(e){return"[object Arguments]"==rt.call(e)},n.isArguments(arguments)||(n.isArguments=function(e){return e?tt.call(e,"callee"):!1}
|
||||
);var xt=function(e,t){var n;if(!e)return e;t||(t=I);for(n in e)if(t(e[n],n,e)===X)break;return e},Tt=function(e,t){var n;if(!e)return e;t||(t=I);for(n in e)if(tt.call(e,n)&&t(e[n],n,e)===X)break;return e},Nt={"&":"&","<":"<",">":">",'"':""","'":"'"},Ct=v(Nt),kt=st||function(e){return rt.call(e)==ht};g(/x/)&&(g=function(e){return"[object Function]"==rt.call(e)});var Lt=at?function(e){return y(e)?at(e):[]}:h,At=function(e,t,n){if(!e)return e;var t=t&&"undefined"==typeof n?t:s(t
|
||||
,n),r=e.length,n=-1;if("number"==typeof r){for(;++n<r;)if(t(e[n],n,e)===X)return e}else for(n in e)if(tt.call(e,n)&&t(e[n],n,e)===X)return e};n.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=d(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=F(e[i],e)}return e},n.chain=function(e){return e=new n(e),e.__chain__=!0,e},n.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},n.countBy=function(e,t,n){var r={},t=s(t,n);return At(e,function(e,n,i){n=t(e,n,i)
|
||||
,tt.call(r,n)?r[n]++:r[n]=1}),r},n.defaults=p,n.difference=function(e){for(var t=-1,n=e.length,r=Z.apply(z,arguments),i=[];++t<n;){var s=e[t];0>P(r,s,n)&&i.push(s)}return i},n.filter=T,n.flatten=D,n.forEach=At,n.functions=d,n.groupBy=function(e,t,n){var r={},t=s(t,n);return At(e,function(e,n,i){n=t(e,n,i),(tt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},n.initial=function(e,t,n){if(!e)return[];var r=e.length;return f(e,0,lt(ft(0,r-(null==t||n?1:t||0)),r))},n.intersection=function(e){var t=arguments,n=t.length
|
||||
,r=[];return At(e,function(e){if(0>P(r,e)){for(var i=n;--i;)if(0>P(t[i],e))return;r.push(e)}}),r},n.invert=v,n.invoke=function(e,t){var n=f(arguments,2),r="function"==typeof t,i=[];return At(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},n.keys=Lt,n.map=C,n.max=k,n.min=function(e,t,n){var r=Infinity,i=-1,o=e?e.length:0,u=r;if(t||!kt(e))t=s(t,n),At(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,u=e)});else for(;++i<o;)e[i]<u&&(u=e[i]);return u},n.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<
|
||||
r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},n.omit=function(e){var t=Z.apply(z,arguments),n={};return xt(e,function(e,r){0>P(t,r,1)&&(n[r]=e)}),n},n.pairs=function(e){var t=[];return Tt(e,function(e,n){t.push([n,e])}),t},n.pick=function(e){for(var t=0,n=Z.apply(z,arguments),r=n.length,i={};++t<r;){var s=n[t];s in e&&(i[s]=e[s])}return i},n.pluck=L,n.range=function(e,t,n){e=+e||0,n=+n||1,null==t&&(t=e,e=0);for(var r=-1,t=ft(0,Y((t-e)/n)),i=Array(t);++r<t;)i[r]=e,e+=n;return i},n.reject=function(
|
||||
e,t,n){return t=s(t,n),T(e,function(e,n,r){return!t(e,n,r)})},n.rest=H,n.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return At(e,function(e){var r=et(ct()*(++t+1));n[t]=n[r],n[r]=e}),n},n.sortBy=function(e,t,n){var i=[],t=s(t,n);At(e,function(e,n,r){i.push({a:t(e,n,r),b:n,c:e})}),e=i.length;for(i.sort(r);e--;)i[e]=i[e].c;return i},n.tap=function(e,t){return t(e),e},n.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},n.toArray=function(e){return"number"==typeof
|
||||
(e?e.length:0)?f(e):E(e)},n.union=function(){return j(Z.apply(z,arguments))},n.uniq=j,n.values=E,n.where=function(e,t){var n=Lt(t);return T(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},n.without=function(e){for(var t=-1,n=e.length,r=[];++t<n;){var i=e[t];0>P(arguments,i,1)&&r.push(i)}return r},n.zip=function(e){for(var t=-1,n=e?k(L(arguments,"length")):0,r=Array(n);++t<n;)r[t]=L(arguments,t);return r},n.collect=C,n.drop=H,n.each=At,n.extend=c,n.methods=d
|
||||
,n.select=T,n.tail=H,n.unique=j,n.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},n.bind=F,n.clone=function(e){return e&&Et[typeof e]?kt(e)?f(e):c({},e):e},n.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},n.contains=S,n.debounce=function(e,t,n){function r(){u=null,n||(s=e.apply(o,i))}var i,s,o,u;return function(){var a=n&&!u;return i=arguments,o=this,clearTimeout(u),u=setTimeout(
|
||||
r,t),a&&(s=e.apply(o,i)),s}},n.defer=function(e){var n=f(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},n.delay=function(e,n){var r=f(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},n.escape=function(e){return null==e?"":(e+"").replace(Q,u)},n.every=x,n.find=N,n.has=function(e,t){return e?tt.call(e,t):!1},n.identity=I,n.indexOf=P,n.isArray=kt,n.isBoolean=function(e){return!0===e||!1===e||rt.call(e)==pt},n.isDate=function(e){return rt.call(e)==dt},n.isElement=function(e){return e?1===
|
||||
e.nodeType:!1},n.isEmpty=function(e){if(!e)return!0;if(kt(e)||w(e))return!e.length;for(var t in e)if(tt.call(e,t))return!1;return!0},n.isEqual=m,n.isFinite=function(e){return ot(e)&&!ut(parseFloat(e))},n.isFunction=g,n.isNaN=function(e){return b(e)&&e!=+e},n.isNull=function(e){return null===e},n.isNumber=b,n.isObject=y,n.isRegExp=function(e){return rt.call(e)==gt},n.isString=w,n.isUndefined=function(e){return"undefined"==typeof e},n.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof
|
||||
n&&(r=(0>n?ft(0,r+n):lt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},n.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return tt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},n.mixin=q,n.noConflict=function(){return e._=V,this},n.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},n.random=function(e,t){return null==e&&null==t&&(t=1),e=+e||0,null==t&&(t=e,e=0),e+et(ct()*((+t||0)-e+1))},n.reduce=A,n.reduceRight=
|
||||
O,n.result=function(e,t){var n=e?e[t]:null;return g(n)?e[t]():n},n.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:Lt(e).length},n.some=M,n.sortedIndex=B,n.template=function(e,t,r){e||(e="");var r=p({},r,n.templateSettings),i=0,s="__p+='",u=r.variable;e.replace(RegExp((r.escape||K).source+"|"+(r.interpolate||K).source+"|"+(r.evaluate||K).source+"|$","g"),function(t,n,r,u,a){s+=e.slice(i,a).replace(G,o),s+=n?"'+_['escape']("+n+")+'":u?"';"+u+";__p+='":r?"'+((__t=("+r+"))==null?'':__t)+'"
|
||||
:"",i=a+t.length}),s+="';\n",u||(u="obj",s="with("+u+"||{}){"+s+"}"),s="function("+u+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+s+"return __p}";try{var a=Function("_","return "+s)(n)}catch(f){throw f.source=s,f}return t?a(t):(a.source=s,a)},n.throttle=function(e,t){function n(){u=new Date,o=null,i=e.apply(s,r)}var r,i,s,o,u=0;return function(){var a=new Date,f=t-(a-u);return r=arguments,s=this,0>=f?(clearTimeout(o),o=null,u=a,i=e.apply(s,r)):o||(o=setTimeout
|
||||
(n,f)),i}},n.unescape=function(e){return null==e?"":(e+"").replace($,l)},n.uniqueId=function(e){var t=++W+"";return e?e+t:t},n.wrap=function(e,t){return function(){var n=[e];return nt.apply(n,arguments),t.apply(this,n)}},n.all=x,n.any=M,n.detect=N,n.foldl=A,n.foldr=O,n.include=S,n.inject=A,n.first=_,n.last=function(e,t,n){if(e){var r=e.length;return null==t||n?e[r-1]:f(e,ft(0,r-t))}},n.take=_,n.head=_,n.VERSION="1.0.0-rc.2",q(n),n.prototype.chain=function(){return this.__chain__=!0,this},n.prototype
|
||||
.value=function(){return this.__wrapped__},At("pop push reverse shift sort splice unshift".split(" "),function(e){var t=z[e];n.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),wt&&e.length===0&&delete e[0],this}}),At(["concat","join","slice"],function(e){var t=z[e];n.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new n(e),e.__chain__=!0),e}}),R?"object"==typeof module&&module&&module.exports==R?(module.exports=n)._=n:R._=n:e._=
|
||||
n})(this);
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"version": "1.0.0-rc.1",
|
||||
"version": "1.0.0-rc.2",
|
||||
"description": "A utility library, usable as a drop-in replacement for Underscore, delivering performance, bug fixes, and additional features.",
|
||||
"homepage": "http://lodash.com",
|
||||
"main": "./lodash",
|
||||
|
||||
@@ -679,7 +679,6 @@
|
||||
|
||||
object = { 'length': 0, 'splice': Array.prototype.splice };
|
||||
equal(lodash.isEmpty(object), false, '_.isEmpty should return `false` for jQuery/MooTools DOM query collections: ' + basename);
|
||||
equal(lodash.isFinite('2'), false, '_.isFinite should return `false` for numeric string values: ' + basename);
|
||||
|
||||
object = { 'a': 1, 'b': 2, 'c': 3 };
|
||||
equal(lodash.isEqual(object, { 'a': 1, 'b': 0, 'c': 3 }), false, '_.isEqual: ' + basename);
|
||||
@@ -697,10 +696,7 @@
|
||||
|
||||
equal(lodash.some([false, true, false]), true, '_.some: ' + basename);
|
||||
equal(lodash.template('${a}', object), '${a}', '_.template should ignore ES6 delimiters: ' + basename);
|
||||
|
||||
actual = [lodash.uniqueId(3), lodash.uniqueId(2), lodash.uniqueId(1)];
|
||||
equal(actual.join(','), '3,3,3', '_.uniqueId should not coerce the prefix argument to a string: ' + basename);
|
||||
equal(typeof lodash.uniqueId(), 'number', '_.uniqueId should return a number value when not passing a prefix argument: ' + basename);
|
||||
equal(lodash.uniqueId(0), '1', '_.uniqueId should ignore a prefix of `0`: ' + basename);
|
||||
|
||||
var wrapped = lodash(1);
|
||||
equal(wrapped.clone() instanceof lodash, false, '_(...) wrapped values are not chainable by default: ' + basename);
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
</div>
|
||||
<img id="chart_image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">
|
||||
</div>
|
||||
<script src="../vendor/json3/lib/json3.js"></script>
|
||||
<script src="../vendor/jquery/jquery.js"></script>
|
||||
<script src="../vendor/platform.js/platform.js"></script>
|
||||
<script>
|
||||
|
||||
4
vendor/underscore/underscore-min.js
vendored
4
vendor/underscore/underscore-min.js
vendored
File diff suppressed because one or more lines are too long
17
vendor/underscore/underscore.js
vendored
17
vendor/underscore/underscore.js
vendored
@@ -1,4 +1,4 @@
|
||||
// Underscore.js 1.4.2
|
||||
// Underscore.js 1.4.3
|
||||
// http://underscorejs.org
|
||||
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
||||
// Underscore may be freely distributed under the MIT license.
|
||||
@@ -24,7 +24,6 @@
|
||||
var push = ArrayProto.push,
|
||||
slice = ArrayProto.slice,
|
||||
concat = ArrayProto.concat,
|
||||
unshift = ArrayProto.unshift,
|
||||
toString = ObjProto.toString,
|
||||
hasOwnProperty = ObjProto.hasOwnProperty;
|
||||
|
||||
@@ -65,7 +64,7 @@
|
||||
}
|
||||
|
||||
// Current version.
|
||||
_.VERSION = '1.4.2';
|
||||
_.VERSION = '1.4.3';
|
||||
|
||||
// Collection Functions
|
||||
// --------------------
|
||||
@@ -102,6 +101,8 @@
|
||||
return results;
|
||||
};
|
||||
|
||||
var reduceError = 'Reduce of empty array with no initial value';
|
||||
|
||||
// **Reduce** builds up a single result from a list of values, aka `inject`,
|
||||
// or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
|
||||
_.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
|
||||
@@ -119,7 +120,7 @@
|
||||
memo = iterator.call(context, memo, value, index, list);
|
||||
}
|
||||
});
|
||||
if (!initial) throw new TypeError('Reduce of empty array with no initial value');
|
||||
if (!initial) throw new TypeError(reduceError);
|
||||
return memo;
|
||||
};
|
||||
|
||||
@@ -146,7 +147,7 @@
|
||||
memo = iterator.call(context, memo, obj[index], index, list);
|
||||
}
|
||||
});
|
||||
if (!initial) throw new TypeError('Reduce of empty array with no initial value');
|
||||
if (!initial) throw new TypeError(reduceError);
|
||||
return memo;
|
||||
};
|
||||
|
||||
@@ -239,7 +240,7 @@
|
||||
if (_.isEmpty(attrs)) return [];
|
||||
return _.filter(obj, function(value) {
|
||||
for (var key in attrs) {
|
||||
if (_.has(attrs, key) && attrs[key] !== value[key]) return false;
|
||||
if (attrs[key] !== value[key]) return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
@@ -336,7 +337,7 @@
|
||||
// either a string attribute to count by, or a function that returns the
|
||||
// criterion.
|
||||
_.countBy = function(obj, value, context) {
|
||||
return group(obj, value, context, function(result, key, value) {
|
||||
return group(obj, value, context, function(result, key) {
|
||||
if (!_.has(result, key)) result[key] = 0;
|
||||
result[key]++;
|
||||
});
|
||||
@@ -961,7 +962,7 @@
|
||||
|
||||
// Is a given object a finite number?
|
||||
_.isFinite = function(obj) {
|
||||
return isFinite( obj ) && !isNaN( parseFloat(obj) );
|
||||
return isFinite(obj) && !isNaN(parseFloat(obj));
|
||||
};
|
||||
|
||||
// Is the given value `NaN`? (NaN is the only number which does not equal itself).
|
||||
|
||||
Reference in New Issue
Block a user