mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Rename Lo-Dash references to lodash. [ci skip]
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Contributing to Lo-Dash
|
||||
# Contributing to lodash
|
||||
|
||||
If you’d like to contribute a feature or bug fix, you can [fork](https://help.github.com/articles/fork-a-repo/) Lo-Dash, commit your changes, & [send a pull request](https://help.github.com/articles/using-pull-requests/).
|
||||
If you’d like to contribute a feature or bug fix, you can [fork](https://help.github.com/articles/fork-a-repo/) lodash, commit your changes, & [send a pull request](https://help.github.com/articles/using-pull-requests/).
|
||||
Please make sure to [search the issue tracker](https://github.com/lodash/lodash/issues) first; your issue may have already been discussed or fixed in `master`.
|
||||
|
||||
## Tests
|
||||
@@ -14,7 +14,7 @@ The [Backbone](http://backbonejs.org/) & [Underscore](http://underscorejs.org/)
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
Lo-Dash is a member of the [Dojo Foundation](http://dojofoundation.org/).
|
||||
lodash is a member of the [Dojo Foundation](http://dojofoundation.org/).
|
||||
As such, we request that all contributors sign the Dojo Foundation [contributor license agreement](http://dojofoundation.org/about/claForm).
|
||||
|
||||
For more information about CLAs, please check out Alex Russell’s excellent post, [“Why Do I Need to Sign This?”](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# lodash v3.0.0-pre
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [Lo-Dash](https://lodash.com/) with packages for [Bower](http://bower.io/), [Component](http://component.github.io/), & [Volo](http://volojs.org/).
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) with packages for [Bower](http://bower.io/), [Component](http://component.github.io/), & [Volo](http://volojs.org/).
|
||||
|
||||
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
|
||||
```bash
|
||||
@@ -9,7 +9,7 @@ $ lodash modern -o ./lodash.js
|
||||
|
||||
## Module formats
|
||||
|
||||
Lo-Dash is also available in a variety of other builds & module formats.
|
||||
lodash is also available in a variety of other builds & module formats.
|
||||
|
||||
* npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds
|
||||
* AMD modules for [modern](https://github.com/lodash/lodash/tree/3.0.0-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.0.0-amd) builds
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "lodash",
|
||||
"repo": "lodash/lodash",
|
||||
"version": "3.0.0",
|
||||
"description": "The modern build of Lo-Dash.",
|
||||
"description": "The modern build of lodash.",
|
||||
"license": "MIT",
|
||||
"main": "lodash.js",
|
||||
"keywords": ["stdlib", "util"],
|
||||
|
||||
2
lodash.min.js
vendored
2
lodash.min.js
vendored
@@ -82,4 +82,4 @@ var r=0>n?this.takeRight(-n):this.drop(n);return typeof t!="undefined"&&(t=+t||0
|
||||
n:for(;u--&&c<o;){for(var i=i+r,s=-1,p=n[i];++s<a;){var h=f[s],g=h.iteratee(p,i,n),h=h.type;if(h==U)p=g;else if(!g){if(h==F)continue n;break n}}t?t--:l[c++]=p}return e?l.reverse():l},Wt.prototype.chain=function(){return Ae(this)},Wt.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Ft?new Nt(n.reverse()):this.thru(function(n){return n.reverse()})},Wt.prototype.toString=function(){return this.value()+""},Wt.prototype.toJSON=Wt.prototype.valueOf=Wt.prototype.value=function(){return Sr(this.__wrapped__,this.__actions__)
|
||||
},Wt.prototype.collect=Wt.prototype.map,Wt.prototype.head=Wt.prototype.first,Wt.prototype.select=Wt.prototype.filter,Wt.prototype.tail=Wt.prototype.rest,Wt}var b,w="3.0.0-pre",x=1,A=2,j=4,E=8,R=16,k=32,I=64,O=128,C=256,S=30,T="...",W=150,N=16,F=0,U=1,L=2,$="Expected a function",B="__lodash_placeholder__",z=/\b__p\+='';/g,D=/\b(__p\+=)''\+/g,M=/(__e\(.*?\)|\b__t\))\+'';/g,q=/&(?:amp|lt|gt|quot|#39|#96);/g,P=/[&<>"'`]/g,K=RegExp(q.source),V=RegExp(P.source),Y=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,G=/<%=([\s\S]+?)%>/g,J=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,X=/\w*$/,H=/^\s*function[ \n\r\t]+\w/,Q=/^0[xX]/,nt=/^\[object .+?Constructor\]$/,tt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,rt=/($^)/,et=/[.*+?^${}()|[\]\/\\]/g,ut=RegExp(et.source),ot=/\bthis\b/,it=/['\n\r\u2028\u2029\\]/g,ft=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]{2,}(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),at=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",ct="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window WinRTError".split(" "),lt="[object Arguments]",st="[object Array]",pt="[object Boolean]",ht="[object Date]",gt="[object Error]",vt="[object Function]",dt="[object Number]",yt="[object Object]",_t="[object RegExp]",mt="[object String]",bt="[object ArrayBuffer]",wt="[object Float32Array]",xt="[object Float64Array]",At="[object Int8Array]",jt="[object Int16Array]",Et="[object Int32Array]",Rt="[object Uint8Array]",kt="[object Uint8ClampedArray]",It="[object Uint16Array]",Ot="[object Uint32Array]",Ct={};
|
||||
Ct[lt]=Ct[st]=Ct[wt]=Ct[xt]=Ct[At]=Ct[jt]=Ct[Et]=Ct[Rt]=Ct[kt]=Ct[It]=Ct[Ot]=true,Ct[bt]=Ct[pt]=Ct[ht]=Ct[gt]=Ct[vt]=Ct["[object Map]"]=Ct[dt]=Ct[yt]=Ct[_t]=Ct["[object Set]"]=Ct[mt]=Ct["[object WeakMap]"]=false;var St={};St[lt]=St[st]=St[bt]=St[pt]=St[ht]=St[wt]=St[xt]=St[At]=St[jt]=St[Et]=St[dt]=St[yt]=St[_t]=St[mt]=St[Rt]=St[kt]=St[It]=St[Ot]=true,St[gt]=St[vt]=St["[object Map]"]=St["[object Set]"]=St["[object WeakMap]"]=false;var Tt={leading:false,maxWait:0,trailing:false},Wt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Nt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ft={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ut={"function":true,object:true},Lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$t=Ut[typeof window]&&window!==(this&&this.window)?window:this,Bt=Ut[typeof exports]&&exports&&!exports.nodeType&&exports,Ut=Ut[typeof module]&&module&&!module.nodeType&&module,zt=Bt&&Ut&&typeof global=="object"&&global;
|
||||
!zt||zt.global!==zt&&zt.window!==zt&&zt.self!==zt||($t=zt);var zt=Ut&&Ut.exports===Bt&&Bt,Dt=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($t._=Dt, define(function(){return Dt})):Bt&&Ut?zt?(Ut.exports=Dt)._=Dt:Bt._=Dt:$t._=Dt}).call(this);
|
||||
!zt||zt.global!==zt&&zt.window!==zt&&zt.self!==zt||($t=zt);var zt=Ut&&Ut.exports===Bt&&Bt,Dt=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($t._=Dt, define(function(){return Dt})):Bt&&Ut?zt?(Ut.exports=Dt)._=Dt:Bt._=Dt:$t._=Dt}).call(this);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 3.0.0-pre <https://lodash.com/>
|
||||
* lodash 3.0.0-pre <https://lodash.com/>
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
@@ -849,7 +849,7 @@
|
||||
* Chaining is supported in custom builds as long as the `_#value` method is
|
||||
* directly or indirectly included in the build.
|
||||
*
|
||||
* In addition to Lo-Dash methods, wrappers also have the following `Array` methods:
|
||||
* In addition to lodash methods, wrappers also have the following `Array` methods:
|
||||
* `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`,
|
||||
* and `unshift`
|
||||
*
|
||||
@@ -1103,7 +1103,7 @@
|
||||
}(0, 0));
|
||||
|
||||
/**
|
||||
* By default, the template delimiters used by Lo-Dash are like those in
|
||||
* By default, the template delimiters used by lodash are like those in
|
||||
* embedded Ruby (ERB). Change the following template settings to use
|
||||
* alternative delimiters.
|
||||
*
|
||||
@@ -8818,7 +8818,7 @@
|
||||
while (++index < length) {
|
||||
result[index] = (index + '');
|
||||
}
|
||||
// Lo-Dash skips the `constructor` property when it infers it is iterating
|
||||
// lodash skips the `constructor` property when it infers it is iterating
|
||||
// over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`
|
||||
// attribute of an existing property and the `constructor` property of a
|
||||
// prototype defaults to non-enumerable.
|
||||
@@ -9683,7 +9683,7 @@
|
||||
* for more details.
|
||||
*
|
||||
* For more information on precompiling templates see
|
||||
* [Lo-Dash's custom builds documentation](https://lodash.com/custom-builds).
|
||||
* [lodash's custom builds documentation](https://lodash.com/custom-builds).
|
||||
*
|
||||
* For more information on Chrome extension sandboxes see
|
||||
* [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
|
||||
@@ -10986,13 +10986,13 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// Export Lo-Dash.
|
||||
// Export lodash.
|
||||
var _ = runInContext();
|
||||
|
||||
// Some AMD build optimizers like r.js check for condition patterns like the following:
|
||||
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
|
||||
// Expose Lo-Dash to the global object when an AMD loader is present to avoid
|
||||
// errors in cases where Lo-Dash is loaded by a script tag and not intended
|
||||
// Expose lodash to the global object when an AMD loader is present to avoid
|
||||
// errors in cases where lodash is loaded by a script tag and not intended
|
||||
// as an AMD module. See http://requirejs.org/docs/errors.html#mismatch.
|
||||
root._ = _;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
;(function(window) {
|
||||
'use strict';
|
||||
|
||||
/** The base path of the Lo-Dash builds. */
|
||||
/** The base path of the lodash builds. */
|
||||
var basePath = '../';
|
||||
|
||||
/** The Lo-Dash build to load. */
|
||||
/** The lodash build to load. */
|
||||
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
|
||||
|
||||
/** The other library to load. */
|
||||
@@ -58,10 +58,10 @@
|
||||
span1.innerHTML =
|
||||
'<label for="perf-build">Build: </label>' +
|
||||
'<select id="perf-build">' +
|
||||
'<option value="lodash-compat">Lo-Dash (compat)</option>' +
|
||||
'<option value="lodash-modern">Lo-Dash (modern)</option>' +
|
||||
'<option value="lodash-custom-dev">Lo-Dash (custom development)</option>' +
|
||||
'<option value="lodash-custom">Lo-Dash (custom production)</option>' +
|
||||
'<option value="lodash-compat">lodash (compat)</option>' +
|
||||
'<option value="lodash-modern">lodash (modern)</option>' +
|
||||
'<option value="lodash-custom-dev">lodash (custom development)</option>' +
|
||||
'<option value="lodash-custom">lodash (custom production)</option>' +
|
||||
'</select>';
|
||||
|
||||
var span2 = document.createElement('span');
|
||||
@@ -71,10 +71,10 @@
|
||||
'<select id="perf-other">' +
|
||||
'<option value="underscore-dev">Underscore (development)</option>' +
|
||||
'<option value="underscore">Underscore (production)</option>' +
|
||||
'<option value="lodash-compat">Lo-Dash (compat)</option>' +
|
||||
'<option value="lodash-modern">Lo-Dash (modern)</option>' +
|
||||
'<option value="lodash-custom-dev">Lo-Dash (custom development)</option>' +
|
||||
'<option value="lodash-custom">Lo-Dash (custom production)</option>' +
|
||||
'<option value="lodash-compat">lodash (compat)</option>' +
|
||||
'<option value="lodash-modern">lodash (modern)</option>' +
|
||||
'<option value="lodash-custom-dev">lodash (custom development)</option>' +
|
||||
'<option value="lodash-custom">lodash (custom production)</option>' +
|
||||
'</select>';
|
||||
|
||||
var buildList = span1.lastChild,
|
||||
@@ -112,7 +112,7 @@
|
||||
addListener(otherList, 'change', eventHandler);
|
||||
});
|
||||
|
||||
// The Lo-Dash build file path.
|
||||
// The lodash build file path.
|
||||
ui.buildPath = (function() {
|
||||
var result;
|
||||
switch (build) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Lo-Dash Performance Suite</title>
|
||||
<title>lodash Performance Suite</title>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/** Add `console.log()` support for Narwhal, Rhino, and RingoJS. */
|
||||
var console = root.console || (root.console = { 'log': root.print });
|
||||
|
||||
/** The file path of the Lo-Dash file to test. */
|
||||
/** The file path of the lodash file to test. */
|
||||
var filePath = (function() {
|
||||
var min = 0,
|
||||
result = [];
|
||||
@@ -67,7 +67,7 @@
|
||||
'otherPath': 'underscore'
|
||||
});
|
||||
|
||||
/** The Lo-Dash build basename. */
|
||||
/** The lodash build basename. */
|
||||
var buildName = root.buildName = basename(ui.buildPath, '.js');
|
||||
|
||||
/** The other library basename. */
|
||||
@@ -96,7 +96,7 @@
|
||||
? require
|
||||
: (isJava && root.load) || noop;
|
||||
|
||||
/** Load Lo-Dash. */
|
||||
/** Load lodash. */
|
||||
var lodash = root.lodash || (root.lodash = (
|
||||
lodash = load(filePath) || root._,
|
||||
lodash = lodash._ || lodash,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
;(function(window) {
|
||||
'use strict';
|
||||
|
||||
/** The base path of the Lo-Dash builds. */
|
||||
/** The base path of the lodash builds. */
|
||||
var basePath = '../';
|
||||
|
||||
/** The Lo-Dash build to load. */
|
||||
/** The lodash build to load. */
|
||||
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
|
||||
|
||||
/** The module loader to use. */
|
||||
@@ -95,12 +95,12 @@
|
||||
span1.innerHTML =
|
||||
'<label for="qunit-build">Build: </label>' +
|
||||
'<select id="qunit-build">' +
|
||||
'<option value="lodash-compat-dev">Lo-Dash (compat development)</option>' +
|
||||
'<option value="lodash-compat">Lo-Dash (compat production)</option>' +
|
||||
'<option value="lodash-modern-dev">Lo-Dash (modern development)</option>' +
|
||||
'<option value="lodash-modern">Lo-Dash (modern production)</option>' +
|
||||
'<option value="lodash-custom-dev">Lo-Dash (custom development)</option>' +
|
||||
'<option value="lodash-custom">Lo-Dash (custom production)</option>' +
|
||||
'<option value="lodash-compat-dev">lodash (compat development)</option>' +
|
||||
'<option value="lodash-compat">lodash (compat production)</option>' +
|
||||
'<option value="lodash-modern-dev">lodash (modern development)</option>' +
|
||||
'<option value="lodash-modern">lodash (modern production)</option>' +
|
||||
'<option value="lodash-custom-dev">lodash (custom development)</option>' +
|
||||
'<option value="lodash-custom">lodash (custom production)</option>' +
|
||||
'</select>';
|
||||
|
||||
var span2 = document.createElement('span');
|
||||
@@ -133,10 +133,10 @@
|
||||
// Used to indicate testing in Sauce Labs' automated test cloud.
|
||||
ui.isSauceLabs = location.port == '9001';
|
||||
|
||||
// Used to indicate that Lo-Dash is in strict mode.
|
||||
// Used to indicate that lodash is in strict mode.
|
||||
ui.isStrict = /\bes6?\b/.test([location.pathname, location.search]);
|
||||
|
||||
// The Lo-Dash build file path.
|
||||
// The lodash build file path.
|
||||
ui.buildPath = (function() {
|
||||
var result;
|
||||
switch (build) {
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
document.getElementById('qunit-urlconfig-hidepassed').checked = true;
|
||||
});
|
||||
|
||||
// load Lo-Dash
|
||||
// load lodash
|
||||
if (!ui.isModularize) {
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Lo-Dash Test Suite</title>
|
||||
<title>lodash Test Suite</title>
|
||||
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
|
||||
<style>
|
||||
#exports {
|
||||
@@ -247,14 +247,14 @@
|
||||
delete objectProto._propertyIsEnumerable;
|
||||
}
|
||||
|
||||
// load Lo-Dash and expose it to the bad extensions/shims
|
||||
// load lodash and expose it to the bad extensions/shims
|
||||
if (!ui.isModularize) {
|
||||
addBizarroMethods();
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// store Lo-Dash to test for bad extensions/shims
|
||||
// store lodash to test for bad extensions/shims
|
||||
if (!ui.isModularize) {
|
||||
var lodashBizarro = window._;
|
||||
window._ = undefined;
|
||||
|
||||
12
test/test.js
12
test/test.js
@@ -24,7 +24,7 @@
|
||||
/** Used as a reference to the global object. */
|
||||
var root = (typeof global == 'object' && global) || this;
|
||||
|
||||
/** Used to store Lo-Dash to test for bad extensions/shims. */
|
||||
/** Used to store lodash to test for bad extensions/shims. */
|
||||
var lodashBizarro = root.lodashBizarro;
|
||||
|
||||
/** Used for native method references. */
|
||||
@@ -64,7 +64,7 @@
|
||||
return result;
|
||||
}());
|
||||
|
||||
/** The file path of the Lo-Dash file to test. */
|
||||
/** The file path of the lodash file to test. */
|
||||
var filePath = (function() {
|
||||
var min = 0,
|
||||
result = [];
|
||||
@@ -104,7 +104,7 @@
|
||||
'urlParams': {}
|
||||
});
|
||||
|
||||
/** The basename of the Lo-Dash file to test. */
|
||||
/** The basename of the lodash file to test. */
|
||||
var basename = /[\w.-]+$/.exec(filePath)[0];
|
||||
|
||||
/** Detect if in a Java environment. */
|
||||
@@ -122,7 +122,7 @@
|
||||
/** Detect if running in Rhino. */
|
||||
var isRhino = isJava && typeof global == 'function' && global().Array === root.Array;
|
||||
|
||||
/** Detect if Lo-Dash is in strict mode. */
|
||||
/** Detect if lodash is in strict mode. */
|
||||
var isStrict = ui.isStrict;
|
||||
|
||||
/** Used to test Web Workers. */
|
||||
@@ -517,10 +517,10 @@
|
||||
// Fake `WinRTError`.
|
||||
setProperty(root, 'WinRTError', Error);
|
||||
|
||||
// Clear cache so Lo-Dash can be reloaded.
|
||||
// Clear cache so lodash can be reloaded.
|
||||
emptyObject(require.cache);
|
||||
|
||||
// Load Lo-Dash and expose it to the bad extensions/shims.
|
||||
// Load lodash and expose it to the bad extensions/shims.
|
||||
lodashBizarro = (lodashBizarro = require(filePath))._ || lodashBizarro['default'] || lodashBizarro;
|
||||
|
||||
// Restore native methods.
|
||||
|
||||
66
vendor/benchmark.js/benchmark.js
vendored
66
vendor/benchmark.js/benchmark.js
vendored
@@ -71,11 +71,11 @@
|
||||
* http://www.itl.nist.gov/div898/handbook/eda/section3/eda3672.htm
|
||||
*/
|
||||
var tTable = {
|
||||
'1': 12.706,'2': 4.303, '3': 3.182, '4': 2.776, '5': 2.571, '6': 2.447,
|
||||
'7': 2.365, '8': 2.306, '9': 2.262, '10': 2.228, '11': 2.201, '12': 2.179,
|
||||
'13': 2.16, '14': 2.145, '15': 2.131, '16': 2.12, '17': 2.11, '18': 2.101,
|
||||
'19': 2.093, '20': 2.086, '21': 2.08, '22': 2.074, '23': 2.069, '24': 2.064,
|
||||
'25': 2.06, '26': 2.056, '27': 2.052, '28': 2.048, '29': 2.045, '30': 2.042,
|
||||
'1': 12.706, '2': 4.303, '3': 3.182, '4': 2.776, '5': 2.571, '6': 2.447,
|
||||
'7': 2.365, '8': 2.306, '9': 2.262, '10': 2.228, '11': 2.201, '12': 2.179,
|
||||
'13': 2.16, '14': 2.145, '15': 2.131, '16': 2.12, '17': 2.11, '18': 2.101,
|
||||
'19': 2.093, '20': 2.086, '21': 2.08, '22': 2.074, '23': 2.069, '24': 2.064,
|
||||
'25': 2.06, '26': 2.056, '27': 2.052, '28': 2.048, '29': 2.045, '30': 2.042,
|
||||
'infinity': 1.96
|
||||
};
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
* @returns {Function} Returns a new `Benchmark` function.
|
||||
*/
|
||||
function runInContext(context) {
|
||||
// exit early if unable to acquire Lo-Dash
|
||||
// exit early if unable to acquire lodash
|
||||
var _ = context && context._ || req('lodash') || root._;
|
||||
if (!_) {
|
||||
Benchmark.runInContext = runInContext;
|
||||
@@ -257,31 +257,31 @@
|
||||
*/
|
||||
var timer = {
|
||||
|
||||
/**
|
||||
* The timer namespace object or constructor.
|
||||
*
|
||||
* @private
|
||||
* @memberOf timer
|
||||
* @type {Function|Object}
|
||||
*/
|
||||
/**
|
||||
* The timer namespace object or constructor.
|
||||
*
|
||||
* @private
|
||||
* @memberOf timer
|
||||
* @type {Function|Object}
|
||||
*/
|
||||
'ns': Date,
|
||||
|
||||
/**
|
||||
* Starts the deferred timer.
|
||||
*
|
||||
* @private
|
||||
* @memberOf timer
|
||||
* @param {Object} deferred The deferred instance.
|
||||
*/
|
||||
/**
|
||||
* Starts the deferred timer.
|
||||
*
|
||||
* @private
|
||||
* @memberOf timer
|
||||
* @param {Object} deferred The deferred instance.
|
||||
*/
|
||||
'start': null, // lazy defined in `clock()`
|
||||
|
||||
/**
|
||||
* Stops the deferred timer.
|
||||
*
|
||||
* @private
|
||||
* @memberOf timer
|
||||
* @param {Object} deferred The deferred instance.
|
||||
*/
|
||||
/**
|
||||
* Stops the deferred timer.
|
||||
*
|
||||
* @private
|
||||
* @memberOf timer
|
||||
* @param {Object} deferred The deferred instance.
|
||||
*/
|
||||
'stop': null // lazy defined in `clock()`
|
||||
};
|
||||
|
||||
@@ -290,8 +290,8 @@
|
||||
/**
|
||||
* The Benchmark constructor.
|
||||
*
|
||||
* Note: The Benchmark constructor exposes a handful of Lo-Dash methods to
|
||||
* make working with arrays, collections, and objects easier. The Lo-Dash
|
||||
* Note: The Benchmark constructor exposes a handful of lodash methods to
|
||||
* make working with arrays, collections, and objects easier. The lodash
|
||||
* methods are:
|
||||
* [`each/forEach`](https://lodash.com/docs#forEach), [`forOwn`](https://lodash.com/docs#forOwn),
|
||||
* [`has`](https://lodash.com/docs#has), [`indexOf`](https://lodash.com/docs#indexOf),
|
||||
@@ -441,8 +441,8 @@
|
||||
/**
|
||||
* The Suite constructor.
|
||||
*
|
||||
* Note: Each Suite instance has a handful of wrapped Lo-Dash methods to
|
||||
* make working with Suites easier. The wrapped Lo-Dash methods are:
|
||||
* Note: Each Suite instance has a handful of wrapped lodash methods to
|
||||
* make working with Suites easier. The wrapped lodash methods are:
|
||||
* [`each/forEach`](https://lodash.com/docs#forEach), [`indexOf`](https://lodash.com/docs#indexOf),
|
||||
* [`map`](https://lodash.com/docs#map), [`pluck`](https://lodash.com/docs#pluck),
|
||||
* and [`reduce`](https://lodash.com/docs#reduce)
|
||||
@@ -2354,7 +2354,7 @@
|
||||
'support': support
|
||||
});
|
||||
|
||||
// Add Lo-Dash methods to Benchmark
|
||||
// Add lodash methods to Benchmark
|
||||
_.each(['each', 'forEach', 'forOwn', 'has', 'indexOf', 'map', 'pluck', 'reduce'], function(methodName) {
|
||||
Benchmark[methodName] = _[methodName];
|
||||
});
|
||||
@@ -2802,7 +2802,7 @@
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
// add Lo-Dash methods as Suite methods
|
||||
// add lodash methods as Suite methods
|
||||
_.each(['each', 'forEach', 'indexOf', 'map', 'pluck', 'reduce'], function(methodName) {
|
||||
var func = _[methodName];
|
||||
Suite.prototype[methodName] = function() {
|
||||
|
||||
Reference in New Issue
Block a user