mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 20:37:48 +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"],
|
||||
|
||||
@@ -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