mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Update year to 2014. [ci skip]
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
Copyright 2012-2014 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
|
Based on Underscore.js 1.5.2, copyright 2009-2014 Jeremy Ashkenas,
|
||||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|||||||
2
dist/lodash.compat.js
vendored
2
dist/lodash.compat.js
vendored
@@ -2,7 +2,7 @@
|
|||||||
* @license
|
* @license
|
||||||
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
|
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
|
||||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2014 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <http://lodash.com/license>
|
* Available under MIT license <http://lodash.com/license>
|
||||||
|
|||||||
2
dist/lodash.js
vendored
2
dist/lodash.js
vendored
@@ -2,7 +2,7 @@
|
|||||||
* @license
|
* @license
|
||||||
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
|
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
|
||||||
* Build: `lodash modern -o ./dist/lodash.js`
|
* Build: `lodash modern -o ./dist/lodash.js`
|
||||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2014 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <http://lodash.com/license>
|
* Available under MIT license <http://lodash.com/license>
|
||||||
|
|||||||
2
dist/lodash.underscore.js
vendored
2
dist/lodash.underscore.js
vendored
@@ -2,7 +2,7 @@
|
|||||||
* @license
|
* @license
|
||||||
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
|
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
|
||||||
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
||||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2014 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <http://lodash.com/license>
|
* Available under MIT license <http://lodash.com/license>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @license
|
* @license
|
||||||
* Lo-Dash 2.4.1 <http://lodash.com/>
|
* Lo-Dash 2.4.1 <http://lodash.com/>
|
||||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2014 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
* Available under MIT license <http://lodash.com/license>
|
* Available under MIT license <http://lodash.com/license>
|
||||||
|
|||||||
2
vendor/benchmark.js/LICENSE.txt
vendored
2
vendor/benchmark.js/LICENSE.txt
vendored
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2010-2013 Mathias Bynens <http://mathiasbynens.be/>
|
Copyright 2010-2014 Mathias Bynens <http://mathiasbynens.be/>
|
||||||
Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
|
Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
|
||||||
Modified by John-David Dalton <http://allyoucanleet.com/>
|
Modified by John-David Dalton <http://allyoucanleet.com/>
|
||||||
|
|
||||||
|
|||||||
222
vendor/benchmark.js/benchmark.js
vendored
222
vendor/benchmark.js/benchmark.js
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
* Benchmark.js v1.0.0 <http://benchmarkjs.com/>
|
* Benchmark.js v1.0.0 <http://benchmarkjs.com/>
|
||||||
* Copyright 2010-2013 Mathias Bynens <http://mths.be/>
|
* Copyright 2010-2014 Mathias Bynens <http://mths.be/>
|
||||||
* Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
|
* Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
|
||||||
* Modified by John-David Dalton <http://allyoucanleet.com/>
|
* Modified by John-David Dalton <http://allyoucanleet.com/>
|
||||||
* Available under MIT license <http://mths.be/mit>
|
* Available under MIT license <http://mths.be/mit>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
var contextProps = [
|
var contextProps = [
|
||||||
'Array', 'Date', 'Function', 'Math', 'Object', 'RegExp', 'String', '_',
|
'Array', 'Date', 'Function', 'Math', 'Object', 'RegExp', 'String', '_',
|
||||||
'clearTimeout', 'chrome', 'chromium', 'document', 'java', 'navigator',
|
'clearTimeout', 'chrome', 'chromium', 'document', 'java', 'navigator',
|
||||||
'performance', 'platform', 'process', 'runtime', 'setTimeout'
|
'performance', 'phantom', 'platform', 'process', 'runtime', 'setTimeout'
|
||||||
];
|
];
|
||||||
|
|
||||||
/** Used to avoid hz of Infinity */
|
/** Used to avoid hz of Infinity */
|
||||||
@@ -162,7 +162,8 @@
|
|||||||
shift = arrayRef.shift,
|
shift = arrayRef.shift,
|
||||||
slice = arrayRef.slice,
|
slice = arrayRef.slice,
|
||||||
sqrt = Math.sqrt,
|
sqrt = Math.sqrt,
|
||||||
toString = objectProto.toString;
|
toString = objectProto.toString,
|
||||||
|
unshift = arrayRef.unshift;
|
||||||
|
|
||||||
/** Detect DOM document object */
|
/** Detect DOM document object */
|
||||||
var doc = isHostType(context, 'document') && context.document;
|
var doc = isHostType(context, 'document') && context.document;
|
||||||
@@ -202,14 +203,6 @@
|
|||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
/**
|
|
||||||
* Detect Adobe AIR.
|
|
||||||
*
|
|
||||||
* @memberOf Benchmark.support
|
|
||||||
* @type boolean
|
|
||||||
*/
|
|
||||||
support.air = isClassOf(context.runtime, 'ScriptBridgingProxyObject');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detect if in a browser environment.
|
* Detect if in a browser environment.
|
||||||
*
|
*
|
||||||
@@ -234,6 +227,14 @@
|
|||||||
*/
|
*/
|
||||||
support.timeout = isHostType(context, 'setTimeout') && isHostType(context, 'clearTimeout');
|
support.timeout = isHostType(context, 'setTimeout') && isHostType(context, 'clearTimeout');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Detect if `Array#unshift` returns the new length of the array (all but IE < 8).
|
||||||
|
*
|
||||||
|
* @memberOf _.support
|
||||||
|
* @type boolean
|
||||||
|
*/
|
||||||
|
support.unshiftResult = !![].unshift(1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detect if functions support decompilation.
|
* Detect if functions support decompilation.
|
||||||
*
|
*
|
||||||
@@ -429,12 +430,12 @@
|
|||||||
*/
|
*/
|
||||||
function Event(type) {
|
function Event(type) {
|
||||||
var event = this;
|
var event = this;
|
||||||
|
if (type instanceof Event) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
return (event == null || event.constructor != Event)
|
return (event == null || event.constructor != Event)
|
||||||
? new Event(type)
|
? new Event(type)
|
||||||
: (type instanceof Event
|
: _.assign(event, { 'timeStamp': +new Date }, typeof type == 'string' ? { 'type': type } : type);
|
||||||
? type
|
|
||||||
: _.extend(event, { 'timeStamp': +new Date }, typeof type == 'string' ? { 'type': type } : type)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -482,7 +483,7 @@
|
|||||||
return new Suite(name, options);
|
return new Suite(name, options);
|
||||||
}
|
}
|
||||||
// juggle arguments
|
// juggle arguments
|
||||||
if (isClassOf(name, 'Object')) {
|
if (_.isPlainObject(name)) {
|
||||||
// 1 argument (options)
|
// 1 argument (options)
|
||||||
options = name;
|
options = name;
|
||||||
} else {
|
} else {
|
||||||
@@ -601,7 +602,7 @@
|
|||||||
result = (result || '').replace(/^\s+|\s+$/g, '');
|
result = (result || '').replace(/^\s+|\s+$/g, '');
|
||||||
|
|
||||||
// detect strings containing only the "use strict" directive
|
// detect strings containing only the "use strict" directive
|
||||||
return /^(?:\/\*+[\w|\W]*?\*\/|\/\/.*?[\n\r\u2028\u2029]|\s)*(["'])use strict\1;?$/.test(result)
|
return /^(?:\/\*+[\w\W]*?\*\/|\/\/.*?[\n\r\u2028\u2029]|\s)*(["'])use strict\1;?$/.test(result)
|
||||||
? ''
|
? ''
|
||||||
: result;
|
: result;
|
||||||
}
|
}
|
||||||
@@ -644,7 +645,7 @@
|
|||||||
* @returns {boolean} Returns `true` if the value can be coerced, else `false`.
|
* @returns {boolean} Returns `true` if the value can be coerced, else `false`.
|
||||||
*/
|
*/
|
||||||
function isStringable(value) {
|
function isStringable(value) {
|
||||||
return _.has(value, 'toString') || isClassOf(value, 'String');
|
return _.has(value, 'toString') || _.isString(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -709,8 +710,9 @@
|
|||||||
* @param {Object} [options={}] Options object.
|
* @param {Object} [options={}] Options object.
|
||||||
*/
|
*/
|
||||||
function setOptions(object, options) {
|
function setOptions(object, options) {
|
||||||
options = _.extend({}, object.constructor.options, options);
|
options = object.options = _.assign({}, cloneDeep(object.constructor.options), cloneDeep(options));
|
||||||
object.options = _.forOwn(options, function(value, key) {
|
|
||||||
|
_.forOwn(options, function(value, key) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
// add event listeners
|
// add event listeners
|
||||||
if (/^on[A-Z]/.test(key)) {
|
if (/^on[A-Z]/.test(key)) {
|
||||||
@@ -960,7 +962,7 @@
|
|||||||
args = slice.call(arguments, 2);
|
args = slice.call(arguments, 2);
|
||||||
} else {
|
} else {
|
||||||
// 2 arguments (array, options)
|
// 2 arguments (array, options)
|
||||||
options = _.extend(options, name);
|
options = _.assign(options, name);
|
||||||
name = options.name;
|
name = options.name;
|
||||||
args = _.isArray(args = 'args' in options ? options.args : []) ? args : [args];
|
args = _.isArray(args = 'args' in options ? options.args : []) ? args : [args];
|
||||||
queued = options.queued;
|
queued = options.queued;
|
||||||
@@ -1107,7 +1109,7 @@
|
|||||||
*/
|
*/
|
||||||
function cloneSuite(options) {
|
function cloneSuite(options) {
|
||||||
var suite = this,
|
var suite = this,
|
||||||
result = new suite.constructor(_.extend({}, suite.options, options));
|
result = new suite.constructor(_.assign({}, suite.options, options));
|
||||||
|
|
||||||
// copy own properties
|
// copy own properties
|
||||||
_.forOwn(suite, function(value, key) {
|
_.forOwn(suite, function(value, key) {
|
||||||
@@ -1130,7 +1132,7 @@
|
|||||||
*/
|
*/
|
||||||
function filterSuite(callback) {
|
function filterSuite(callback) {
|
||||||
var suite = this,
|
var suite = this,
|
||||||
result = new suite.constructor;
|
result = new suite.constructor(suite.options);
|
||||||
|
|
||||||
result.push.apply(result, filter(suite, callback));
|
result.push.apply(result, filter(suite, callback));
|
||||||
return result;
|
return result;
|
||||||
@@ -1386,11 +1388,10 @@
|
|||||||
*/
|
*/
|
||||||
function clone(options) {
|
function clone(options) {
|
||||||
var bench = this,
|
var bench = this,
|
||||||
sample = bench.stats.sample,
|
result = new bench.constructor(_.assign({}, bench, options));
|
||||||
result = new bench.constructor(_.extend({}, bench, options));
|
|
||||||
|
|
||||||
// correct the `options` object
|
// correct the `options` object
|
||||||
result.options = _.extend({}, bench.options, options);
|
result.options = _.assign({}, cloneDeep(bench.options), cloneDeep(options));
|
||||||
|
|
||||||
// copy own custom properties
|
// copy own custom properties
|
||||||
_.forOwn(bench, function(value, key) {
|
_.forOwn(bench, function(value, key) {
|
||||||
@@ -1463,70 +1464,72 @@
|
|||||||
* @returns {Object} The benchmark instance.
|
* @returns {Object} The benchmark instance.
|
||||||
*/
|
*/
|
||||||
function reset() {
|
function reset() {
|
||||||
var data,
|
var bench = this;
|
||||||
event,
|
|
||||||
bench = this,
|
|
||||||
index = 0,
|
|
||||||
changes = { 'length': 0 },
|
|
||||||
queue = { 'length': 0 };
|
|
||||||
|
|
||||||
if (bench.running && !calledBy.abort) {
|
if (bench.running && !calledBy.abort) {
|
||||||
// no worries, `reset()` is called within `abort()`
|
// no worries, `reset()` is called within `abort()`
|
||||||
calledBy.reset = true;
|
calledBy.reset = true;
|
||||||
bench.abort();
|
bench.abort();
|
||||||
delete calledBy.reset;
|
delete calledBy.reset;
|
||||||
|
return bench;
|
||||||
}
|
}
|
||||||
else {
|
var event,
|
||||||
// a non-recursive solution to check if properties have changed
|
index = 0,
|
||||||
// http://www.jslab.dk/articles/non.recursive.preorder.traversal.part4
|
changes = { 'length': 0 },
|
||||||
data = { 'destination': bench, 'source': _.extend({}, bench.constructor.prototype, bench.options) };
|
queue = { 'length': 0 };
|
||||||
do {
|
|
||||||
_.forOwn(data.source, function(value, key) {
|
|
||||||
var changed,
|
|
||||||
destination = data.destination,
|
|
||||||
currValue = destination[key];
|
|
||||||
|
|
||||||
// skip pseudo private properties like `_timerId` which could be a
|
// a non-recursive solution to check if properties have changed
|
||||||
// Java object in environments like RingoJS
|
// http://www.jslab.dk/articles/non.recursive.preorder.traversal.part4
|
||||||
if (key.charAt(0) == '_') {
|
var data = {
|
||||||
return;
|
'destination': bench,
|
||||||
}
|
'source': _.assign({}, cloneDeep(bench.constructor.prototype), cloneDeep(bench.options))
|
||||||
if (value && typeof value == 'object') {
|
};
|
||||||
if (_.isArray(value)) {
|
|
||||||
// check if an array value has changed to a non-array value
|
|
||||||
if (!_.isArray(currValue)) {
|
|
||||||
changed = currValue = [];
|
|
||||||
}
|
|
||||||
// or has changed its length
|
|
||||||
if (currValue.length != value.length) {
|
|
||||||
changed = currValue = currValue.slice(0, value.length);
|
|
||||||
currValue.length = value.length;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// check if an object has changed to a non-object value
|
|
||||||
else if (!currValue || typeof currValue != 'object') {
|
|
||||||
changed = currValue = {};
|
|
||||||
}
|
|
||||||
// register a changed object
|
|
||||||
if (changed) {
|
|
||||||
changes[changes.length++] = { 'destination': destination, 'key': key, 'value': currValue };
|
|
||||||
}
|
|
||||||
queue[queue.length++] = { 'destination': currValue, 'source': value };
|
|
||||||
}
|
|
||||||
// register a changed primitive
|
|
||||||
else if (value !== currValue && !(value == null || _.isFunction(value))) {
|
|
||||||
changes[changes.length++] = { 'destination': destination, 'key': key, 'value': value };
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
while ((data = queue[index++]));
|
|
||||||
|
|
||||||
// if changed emit the `reset` event and if it isn't cancelled reset the benchmark
|
do {
|
||||||
if (changes.length && (bench.emit(event = Event('reset')), !event.cancelled)) {
|
_.forOwn(data.source, function(value, key) {
|
||||||
_.each(changes, function(data) {
|
var changed,
|
||||||
data.destination[data.key] = data.value;
|
destination = data.destination,
|
||||||
});
|
currValue = destination[key];
|
||||||
}
|
|
||||||
|
// skip pseudo private properties like `_timerId` which could be a
|
||||||
|
// Java object in environments like RingoJS
|
||||||
|
if (key.charAt(0) == '_') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (value && typeof value == 'object') {
|
||||||
|
if (_.isArray(value)) {
|
||||||
|
// check if an array value has changed to a non-array value
|
||||||
|
if (!_.isArray(currValue)) {
|
||||||
|
changed = currValue = [];
|
||||||
|
}
|
||||||
|
// or has changed its length
|
||||||
|
if (currValue.length != value.length) {
|
||||||
|
changed = currValue = currValue.slice(0, value.length);
|
||||||
|
currValue.length = value.length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// check if an object has changed to a non-object value
|
||||||
|
else if (!currValue || typeof currValue != 'object') {
|
||||||
|
changed = currValue = {};
|
||||||
|
}
|
||||||
|
// register a changed object
|
||||||
|
if (changed) {
|
||||||
|
changes[changes.length++] = { 'destination': destination, 'key': key, 'value': currValue };
|
||||||
|
}
|
||||||
|
queue[queue.length++] = { 'destination': currValue, 'source': value };
|
||||||
|
}
|
||||||
|
// register a changed primitive
|
||||||
|
else if (value !== currValue && !(value == null || _.isFunction(value))) {
|
||||||
|
changes[changes.length++] = { 'destination': destination, 'key': key, 'value': value };
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
while ((data = queue[index++]));
|
||||||
|
|
||||||
|
// if changed emit the `reset` event and if it isn't cancelled reset the benchmark
|
||||||
|
if (changes.length && (bench.emit(event = Event('reset')), !event.cancelled)) {
|
||||||
|
_.each(changes, function(data) {
|
||||||
|
data.destination[data.key] = data.value;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return bench;
|
return bench;
|
||||||
}
|
}
|
||||||
@@ -1633,7 +1636,7 @@
|
|||||||
throw new Error('The test "' + name + '" is empty. This may be the result of dead code removal.');
|
throw new Error('The test "' + name + '" is empty. This may be the result of dead code removal.');
|
||||||
}
|
}
|
||||||
else if (!deferred) {
|
else if (!deferred) {
|
||||||
// pretest to determine if compiled code is exits early, usually by a
|
// pretest to determine if compiled code exits early, usually by a
|
||||||
// rogue `return` statement, by checking for a return object with the uid
|
// rogue `return` statement, by checking for a return object with the uid
|
||||||
bench.count = 1;
|
bench.count = 1;
|
||||||
compiled = (compiled.call(bench, context, timer) || {}).uid == templateData.uid && compiled;
|
compiled = (compiled.call(bench, context, timer) || {}).uid == templateData.uid && compiled;
|
||||||
@@ -1689,7 +1692,7 @@
|
|||||||
|
|
||||||
templateData.uid = uid + uidCounter++;
|
templateData.uid = uid + uidCounter++;
|
||||||
|
|
||||||
_.extend(templateData, {
|
_.assign(templateData, {
|
||||||
'setup': getSource(bench.setup, interpolate('m#.setup()')),
|
'setup': getSource(bench.setup, interpolate('m#.setup()')),
|
||||||
'fn': getSource(fn, interpolate('m#.fn(' + fnArg + ')')),
|
'fn': getSource(fn, interpolate('m#.fn(' + fnArg + ')')),
|
||||||
'fnArg': fnArg,
|
'fnArg': fnArg,
|
||||||
@@ -1699,12 +1702,12 @@
|
|||||||
// use API of chosen timer
|
// use API of chosen timer
|
||||||
if (timer.unit == 'ns') {
|
if (timer.unit == 'ns') {
|
||||||
if (timer.ns.nanoTime) {
|
if (timer.ns.nanoTime) {
|
||||||
_.extend(templateData, {
|
_.assign(templateData, {
|
||||||
'begin': interpolate('s#=n#.nanoTime()'),
|
'begin': interpolate('s#=n#.nanoTime()'),
|
||||||
'end': interpolate('r#=(n#.nanoTime()-s#)/1e9')
|
'end': interpolate('r#=(n#.nanoTime()-s#)/1e9')
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
_.extend(templateData, {
|
_.assign(templateData, {
|
||||||
'begin': interpolate('s#=n#()'),
|
'begin': interpolate('s#=n#()'),
|
||||||
'end': interpolate('r#=n#(s#);r#=r#[0]+(r#[1]/1e9)')
|
'end': interpolate('r#=n#(s#);r#=r#[0]+(r#[1]/1e9)')
|
||||||
});
|
});
|
||||||
@@ -1712,24 +1715,24 @@
|
|||||||
}
|
}
|
||||||
else if (timer.unit == 'us') {
|
else if (timer.unit == 'us') {
|
||||||
if (timer.ns.stop) {
|
if (timer.ns.stop) {
|
||||||
_.extend(templateData, {
|
_.assign(templateData, {
|
||||||
'begin': interpolate('s#=n#.start()'),
|
'begin': interpolate('s#=n#.start()'),
|
||||||
'end': interpolate('r#=n#.microseconds()/1e6')
|
'end': interpolate('r#=n#.microseconds()/1e6')
|
||||||
});
|
});
|
||||||
} else if (perfName) {
|
} else if (perfName) {
|
||||||
_.extend(templateData, {
|
_.assign(templateData, {
|
||||||
'begin': interpolate('s#=n#.' + perfName + '()'),
|
'begin': interpolate('s#=n#.' + perfName + '()'),
|
||||||
'end': interpolate('r#=(n#.' + perfName + '()-s#)/1e3')
|
'end': interpolate('r#=(n#.' + perfName + '()-s#)/1e3')
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
_.extend(templateData, {
|
_.assign(templateData, {
|
||||||
'begin': interpolate('s#=n#()'),
|
'begin': interpolate('s#=n#()'),
|
||||||
'end': interpolate('r#=(n#()-s#)/1e6')
|
'end': interpolate('r#=(n#()-s#)/1e6')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_.extend(templateData, {
|
_.assign(templateData, {
|
||||||
'begin': interpolate('s#=new n#'),
|
'begin': interpolate('s#=new n#'),
|
||||||
'end': interpolate('r#=(new n#-s#)/1e3')
|
'end': interpolate('r#=(new n#-s#)/1e3')
|
||||||
});
|
});
|
||||||
@@ -1980,7 +1983,7 @@
|
|||||||
// relative margin of error
|
// relative margin of error
|
||||||
rme = (moe / mean) * 100 || 0;
|
rme = (moe / mean) * 100 || 0;
|
||||||
|
|
||||||
_.extend(bench.stats, {
|
_.assign(bench.stats, {
|
||||||
'deviation': sd,
|
'deviation': sd,
|
||||||
'mean': mean,
|
'mean': mean,
|
||||||
'moe': moe,
|
'moe': moe,
|
||||||
@@ -2185,8 +2188,8 @@
|
|||||||
// The bugginess continues as the `Benchmark` constructor has an argument
|
// The bugginess continues as the `Benchmark` constructor has an argument
|
||||||
// named `options` and Firefox 1 will not assign a value to `Benchmark.options`,
|
// named `options` and Firefox 1 will not assign a value to `Benchmark.options`,
|
||||||
// making it non-writable in the process, unless it is the first property
|
// making it non-writable in the process, unless it is the first property
|
||||||
// assigned by for-in loop of `_.extend()`.
|
// assigned by for-in loop of `_.assign()`.
|
||||||
_.extend(Benchmark, {
|
_.assign(Benchmark, {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default options copied by benchmark instances.
|
* The default options copied by benchmark instances.
|
||||||
@@ -2353,7 +2356,7 @@
|
|||||||
'version': '1.0.0'
|
'version': '1.0.0'
|
||||||
});
|
});
|
||||||
|
|
||||||
_.extend(Benchmark, {
|
_.assign(Benchmark, {
|
||||||
'filter': filter,
|
'filter': filter,
|
||||||
'formatNumber': formatNumber,
|
'formatNumber': formatNumber,
|
||||||
'invoke': invoke,
|
'invoke': invoke,
|
||||||
@@ -2369,7 +2372,7 @@
|
|||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
|
|
||||||
_.extend(Benchmark.prototype, {
|
_.assign(Benchmark.prototype, {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of times a test was executed.
|
* The number of times a test was executed.
|
||||||
@@ -2613,7 +2616,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
_.extend(Benchmark.prototype, {
|
_.assign(Benchmark.prototype, {
|
||||||
'abort': abort,
|
'abort': abort,
|
||||||
'clone': clone,
|
'clone': clone,
|
||||||
'compare': compare,
|
'compare': compare,
|
||||||
@@ -2628,7 +2631,7 @@
|
|||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
|
|
||||||
_.extend(Deferred.prototype, {
|
_.assign(Deferred.prototype, {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The deferred benchmark instance.
|
* The deferred benchmark instance.
|
||||||
@@ -2663,13 +2666,13 @@
|
|||||||
'timeStamp': 0
|
'timeStamp': 0
|
||||||
});
|
});
|
||||||
|
|
||||||
_.extend(Deferred.prototype, {
|
_.assign(Deferred.prototype, {
|
||||||
'resolve': resolve
|
'resolve': resolve
|
||||||
});
|
});
|
||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
|
|
||||||
_.extend(Event.prototype, {
|
_.assign(Event.prototype, {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A flag to indicate if the emitters listener iteration is aborted.
|
* A flag to indicate if the emitters listener iteration is aborted.
|
||||||
@@ -2750,7 +2753,7 @@
|
|||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
|
|
||||||
_.extend(Suite.prototype, {
|
_.assign(Suite.prototype, {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of benchmarks in the suite.
|
* The number of benchmarks in the suite.
|
||||||
@@ -2777,7 +2780,7 @@
|
|||||||
'running': false
|
'running': false
|
||||||
});
|
});
|
||||||
|
|
||||||
_.extend(Suite.prototype, {
|
_.assign(Suite.prototype, {
|
||||||
'abort': abortSuite,
|
'abort': abortSuite,
|
||||||
'add': add,
|
'add': add,
|
||||||
'clone': cloneSuite,
|
'clone': cloneSuite,
|
||||||
@@ -2793,16 +2796,16 @@
|
|||||||
'run': runSuite,
|
'run': runSuite,
|
||||||
'reverse': arrayRef.reverse,
|
'reverse': arrayRef.reverse,
|
||||||
'shift': shift,
|
'shift': shift,
|
||||||
'slice': arrayRef.slice,
|
'slice': slice,
|
||||||
'sort': arrayRef.sort,
|
'sort': arrayRef.sort,
|
||||||
'splice': arrayRef.splice,
|
'splice': arrayRef.splice,
|
||||||
'unshift': arrayRef.unshift
|
'unshift': unshift
|
||||||
});
|
});
|
||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// expose Deferred, Event, and Suite
|
// expose Deferred, Event, and Suite
|
||||||
_.extend(Benchmark, {
|
_.assign(Benchmark, {
|
||||||
'Deferred': Deferred,
|
'Deferred': Deferred,
|
||||||
'Event': Event,
|
'Event': Event,
|
||||||
'Suite': Suite
|
'Suite': Suite
|
||||||
@@ -2837,9 +2840,14 @@
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// trigger clock's lazy define early to avoid a security error
|
// avoid buggy `Array#unshift` in IE < 8 which doesn't return the new
|
||||||
if (support.air) {
|
// length of the array
|
||||||
clock({ '_original': { 'fn': noop, 'count': 1, 'options': {} } });
|
if (!support.unshiftResult) {
|
||||||
|
Suite.prototype.unshift = function() {
|
||||||
|
var value = this;
|
||||||
|
unshift.apply(value, arguments);
|
||||||
|
return value.length;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return Benchmark;
|
return Benchmark;
|
||||||
}
|
}
|
||||||
|
|||||||
2
vendor/docdown/LICENSE.txt
vendored
2
vendor/docdown/LICENSE.txt
vendored
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
Copyright 2011-2014 John-David Dalton <http://allyoucanleet.com/>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|||||||
2
vendor/docdown/docdown.php
vendored
2
vendor/docdown/docdown.php
vendored
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*!
|
/*!
|
||||||
* Docdown v1.0.0-pre
|
* Docdown v1.0.0-pre
|
||||||
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
* Copyright 2011-2014 John-David Dalton <http://allyoucanleet.com/>
|
||||||
* Available under MIT license <http://mths.be/mit>
|
* Available under MIT license <http://mths.be/mit>
|
||||||
*/
|
*/
|
||||||
require(dirname(__FILE__) . '/src/DocDown/MarkdownGenerator.php');
|
require(dirname(__FILE__) . '/src/DocDown/MarkdownGenerator.php');
|
||||||
|
|||||||
2
vendor/platform.js/LICENSE.txt
vendored
2
vendor/platform.js/LICENSE.txt
vendored
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
Copyright 2011-2014 John-David Dalton <http://allyoucanleet.com/>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|||||||
2
vendor/platform.js/platform.js
vendored
2
vendor/platform.js/platform.js
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
* Platform.js v1.0.0 <http://mths.be/platform>
|
* Platform.js v1.0.0 <http://mths.be/platform>
|
||||||
* Copyright 2010-2013 John-David Dalton <http://allyoucanleet.com/>
|
* Copyright 2010-2014 John-David Dalton <http://allyoucanleet.com/>
|
||||||
* Available under MIT license <http://mths.be/mit>
|
* Available under MIT license <http://mths.be/mit>
|
||||||
*/
|
*/
|
||||||
;(function(root) {
|
;(function(root) {
|
||||||
|
|||||||
2
vendor/qunit-extras/LICENSE.txt
vendored
2
vendor/qunit-extras/LICENSE.txt
vendored
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
Copyright 2011-2014 John-David Dalton <http://allyoucanleet.com/>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|||||||
2
vendor/qunit-extras/qunit-extras.js
vendored
2
vendor/qunit-extras/qunit-extras.js
vendored
@@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
* QUnit Extras v1.0.0
|
* QUnit Extras v1.0.0
|
||||||
* Copyright 2011-2012 John-David Dalton <http://allyoucanleet.com/>
|
* Copyright 2011-2014 John-David Dalton <http://allyoucanleet.com/>
|
||||||
* Based on a gist by Jörn Zaefferer <https://gist.github.com/722381>
|
* Based on a gist by Jörn Zaefferer <https://gist.github.com/722381>
|
||||||
* Available under MIT license <http://mths.be/mit>
|
* Available under MIT license <http://mths.be/mit>
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user