diff --git a/README.md b/README.md index 1fcfe62fa..a94dcfc94 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v3.0.3 +# lodash v3.0.4 The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. diff --git a/lodash._baseat/README.md b/lodash._baseat/README.md index 5ddb033c5..92f147e58 100644 --- a/lodash._baseat/README.md +++ b/lodash._baseat/README.md @@ -1,4 +1,4 @@ -# lodash._baseat v3.0.3 +# lodash._baseat v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseAt` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseAt = require('lodash._baseat'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseat) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash._baseat) for more details. diff --git a/lodash._baseat/index.js b/lodash._baseat/index.js index f570f2242..17ee243c9 100644 --- a/lodash._baseat/index.js +++ b/lodash._baseat/index.js @@ -1,14 +1,10 @@ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ +/** Used to detect unsigned integer values. */ + +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; /** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -86,7 +82,7 @@ function isArrayLike(value) { * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { - value = typeof value == 'number' ? value : parseFloat(value); + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; length = length == null ? MAX_SAFE_INTEGER : length; return value > -1 && value % 1 == 0 && value < length; } @@ -94,7 +90,7 @@ function isIndex(value, length) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @private * @param {*} value The value to check. diff --git a/lodash._baseat/package.json b/lodash._baseat/package.json index 492f2655f..9ef100775 100644 --- a/lodash._baseat/package.json +++ b/lodash._baseat/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseat", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s internal `baseAt` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._baseeach/README.md b/lodash._baseeach/README.md index ba0fee04c..3c2c24e52 100644 --- a/lodash._baseeach/README.md +++ b/lodash._baseeach/README.md @@ -1,4 +1,4 @@ -# lodash._baseeach v3.0.3 +# lodash._baseeach v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseEach` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseEach = require('lodash._baseeach'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseeach) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash._baseeach) for more details. diff --git a/lodash._baseeach/index.js b/lodash._baseeach/index.js index 0873c3af6..e6defcab0 100644 --- a/lodash._baseeach/index.js +++ b/lodash._baseeach/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -9,10 +9,10 @@ var keys = require('lodash.keys'); /** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. */ -var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; +var MAX_SAFE_INTEGER = 9007199254740991; /** * The base implementation of `_.forEach` without support for callback @@ -130,7 +130,7 @@ var getLength = baseProperty('length'); /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @private * @param {*} value The value to check. @@ -141,7 +141,7 @@ function isLength(value) { } /** - * Converts `value` to an object if it is not one. + * Converts `value` to an object if it's not one. * * @private * @param {*} value The value to process. @@ -175,7 +175,7 @@ function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; - return type == 'function' || (!!value && type == 'object'); + return !!value && (type == 'object' || type == 'function'); } module.exports = baseEach; diff --git a/lodash._baseeach/package.json b/lodash._baseeach/package.json index 1741f1153..30b5e3fe6 100644 --- a/lodash._baseeach/package.json +++ b/lodash._baseeach/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseeach", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s internal `baseEach` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._basefor/LICENSE b/lodash._basefor/LICENSE deleted file mode 100644 index b054ca5a3..000000000 --- a/lodash._basefor/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lodash._basefor/README.md b/lodash._basefor/README.md deleted file mode 100644 index b17e221b1..000000000 --- a/lodash._basefor/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash._basefor v3.0.3 - -The internal [lodash](https://lodash.com/) function `baseFor` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._basefor -``` - -In Node.js: -```js -var baseFor = require('lodash._basefor'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._basefor) for more details. diff --git a/lodash._basefor/index.js b/lodash._basefor/index.js deleted file mode 100644 index 0b9b1f0a8..000000000 --- a/lodash._basefor/index.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -module.exports = baseFor; diff --git a/lodash._basefor/package.json b/lodash._basefor/package.json deleted file mode 100644 index ef3042c2a..000000000 --- a/lodash._basefor/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "lodash._basefor", - "version": "3.0.3", - "description": "The internal lodash function `baseFor` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/lodash._baseisequal/README.md b/lodash._baseisequal/README.md index e4f895eb2..0d069f307 100644 --- a/lodash._baseisequal/README.md +++ b/lodash._baseisequal/README.md @@ -1,4 +1,4 @@ -# lodash._baseisequal v3.0.3 +# lodash._baseisequal v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIsEqual` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseIsEqual = require('lodash._baseisequal'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseisequal) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash._baseisequal) for more details. diff --git a/lodash._baseisequal/index.js b/lodash._baseisequal/index.js index 019c5f03d..74189de6b 100644 --- a/lodash._baseisequal/index.js +++ b/lodash._baseisequal/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -16,7 +16,6 @@ var argsTag = '[object Arguments]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', - funcTag = '[object Function]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', @@ -102,27 +101,23 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, othIsArr = isTypedArray(other); } } - var objIsObj = (objTag == objectTag || (isLoose && objTag == funcTag)), - othIsObj = (othTag == objectTag || (isLoose && othTag == funcTag)), + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && !(objIsArr || objIsObj)) { return equalByTag(object, other, objTag); } - if (isLoose) { - if (!isSameTag && !(objIsObj && othIsObj)) { - return false; - } - } else { + if (!isLoose) { var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (valWrapped || othWrapped) { return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); } - if (!isSameTag) { - return false; - } + } + if (!isSameTag) { + return false; } // Assume cyclic values are equal. // For more information on detecting circular references see https://es5.github.io/#JO. @@ -181,7 +176,7 @@ function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stack ? customizer(othValue, arrValue, index) : customizer(arrValue, othValue, index); } - if (typeof result == 'undefined') { + if (result === undefined) { // Recursively compare arrays (susceptible to call stack limits). if (isLoose) { var othIndex = othLength; @@ -280,7 +275,7 @@ function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, sta ? customizer(othValue, objValue, key) : customizer(objValue, othValue, key); } - if (typeof result == 'undefined') { + if (result === undefined) { // Recursively compare objects (susceptible to call stack limits). result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB); } diff --git a/lodash._baseisequal/package.json b/lodash._baseisequal/package.json index 9d5682c09..7936d05b0 100644 --- a/lodash._baseisequal/package.json +++ b/lodash._baseisequal/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseisequal", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s internal `baseIsEqual` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._createwrapper/README.md b/lodash._createwrapper/README.md index 14cc6ef12..dd6a5d220 100644 --- a/lodash._createwrapper/README.md +++ b/lodash._createwrapper/README.md @@ -1,4 +1,4 @@ -# lodash._createwrapper v3.0.3 +# lodash._createwrapper v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createWrapper` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var createWrapper = require('lodash._createwrapper'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._createwrapper) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash._createwrapper) for more details. diff --git a/lodash._createwrapper/index.js b/lodash._createwrapper/index.js index 6df03ad3a..bc501ed42 100644 --- a/lodash._createwrapper/index.js +++ b/lodash._createwrapper/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -85,12 +85,12 @@ function composeArgsRight(args, partials, holders) { while (++argsIndex < argsLength) { result[argsIndex] = args[argsIndex]; } - var pad = argsIndex; + var offset = argsIndex; while (++rightIndex < rightLength) { - result[pad + rightIndex] = partials[rightIndex]; + result[offset + rightIndex] = partials[rightIndex]; } while (++holdersIndex < holdersLength) { - result[pad + holders[holdersIndex]] = args[argsIndex++]; + result[offset + holders[holdersIndex]] = args[argsIndex++]; } return result; } diff --git a/lodash._createwrapper/package.json b/lodash._createwrapper/package.json index 515965838..92abe1257 100644 --- a/lodash._createwrapper/package.json +++ b/lodash._createwrapper/package.json @@ -1,6 +1,6 @@ { "name": "lodash._createwrapper", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s internal `createWrapper` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._isiterateecall/LICENSE.txt b/lodash._isiterateecall/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash._isiterateecall/LICENSE.txt +++ b/lodash._isiterateecall/LICENSE.txt @@ -1,5 +1,5 @@ Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors Permission is hereby granted, free of charge, to any person obtaining diff --git a/lodash._isiterateecall/README.md b/lodash._isiterateecall/README.md index 9af973d04..d11ba69b3 100644 --- a/lodash._isiterateecall/README.md +++ b/lodash._isiterateecall/README.md @@ -1,4 +1,4 @@ -# lodash._isiterateecall v3.0.3 +# lodash._isiterateecall v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isIterateeCall = require('lodash._isiterateecall'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._isiterateecall) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash._isiterateecall) for more details. diff --git a/lodash._isiterateecall/index.js b/lodash._isiterateecall/index.js index 9d9ad794b..beeeb8b52 100644 --- a/lodash._isiterateecall/index.js +++ b/lodash._isiterateecall/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.2 @@ -50,7 +50,7 @@ function isIterateeCall(value, index, object) { } if (prereq) { var other = object[index]; - return value === value ? value === other : other !== other; + return value === value ? (value === other) : (other !== other); } return false; } diff --git a/lodash._isiterateecall/package.json b/lodash._isiterateecall/package.json index afd9f5dcf..eb06b0401 100644 --- a/lodash._isiterateecall/package.json +++ b/lodash._isiterateecall/package.json @@ -1,6 +1,6 @@ { "name": "lodash._isiterateecall", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s internal `isIterateeCall` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._toiterable/README.md b/lodash._toiterable/README.md index 249078bda..1e2a7890d 100644 --- a/lodash._toiterable/README.md +++ b/lodash._toiterable/README.md @@ -1,4 +1,4 @@ -# lodash._toiterable v3.0.3 +# lodash._toiterable v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `toIterable` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var toIterable = require('lodash._toiterable'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._toiterable) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash._toiterable) for more details. diff --git a/lodash._toiterable/index.js b/lodash._toiterable/index.js index 386c8f9cd..5ba5abf52 100644 --- a/lodash._toiterable/index.js +++ b/lodash._toiterable/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -10,10 +10,10 @@ var baseValues = require('lodash._basevalues'), keys = require('lodash.keys'); /** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. */ -var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; +var MAX_SAFE_INTEGER = 9007199254740991; /** * The base implementation of `_.property` without support for deep paths. @@ -54,7 +54,7 @@ function isArrayLike(value) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @private * @param {*} value The value to check. @@ -65,7 +65,7 @@ function isLength(value) { } /** - * Converts `value` to an array-like object if it is not one. + * Converts `value` to an array-like object if it's not one. * * @private * @param {*} value The value to process. @@ -105,7 +105,7 @@ function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; - return type == 'function' || (!!value && type == 'object'); + return !!value && (type == 'object' || type == 'function'); } /** diff --git a/lodash._toiterable/package.json b/lodash._toiterable/package.json index ff8793f14..e0fe3c7a3 100644 --- a/lodash._toiterable/package.json +++ b/lodash._toiterable/package.json @@ -1,6 +1,6 @@ { "name": "lodash._toiterable", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s internal `toIterable` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isarguments/LICENSE.txt b/lodash.isarguments/LICENSE similarity index 100% rename from lodash.isarguments/LICENSE.txt rename to lodash.isarguments/LICENSE diff --git a/lodash.isarguments/README.md b/lodash.isarguments/README.md index 13d8159b3..2e94f790f 100644 --- a/lodash.isarguments/README.md +++ b/lodash.isarguments/README.md @@ -1,4 +1,4 @@ -# lodash.isarguments v3.0.3 +# lodash.isarguments v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isArguments` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isArguments = require('lodash.isarguments'); ``` -See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isarguments) for more details. +See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isarguments) for more details. diff --git a/lodash.isarguments/index.js b/lodash.isarguments/index.js index ede9f06e9..b947b47df 100644 --- a/lodash.isarguments/index.js +++ b/lodash.isarguments/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -7,9 +7,6 @@ * Available under MIT license */ -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; - /** * Checks if `value` is object-like. * @@ -24,14 +21,14 @@ function isObjectLike(value) { /** Used for native method references. */ var objectProto = Object.prototype; -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Native method references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -75,7 +72,7 @@ function isArrayLike(value) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @private * @param {*} value The value to check. @@ -102,7 +99,8 @@ function isLength(value) { * // => false */ function isArguments(value) { - return isObjectLike(value) && isArrayLike(value) && objToString.call(value) == argsTag; + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); } module.exports = isArguments; diff --git a/lodash.isarguments/package.json b/lodash.isarguments/package.json index c7b748a87..9c7f9e87f 100644 --- a/lodash.isarguments/package.json +++ b/lodash.isarguments/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isarguments", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.isArguments` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isarray/LICENSE.txt b/lodash.isarray/LICENSE similarity index 100% rename from lodash.isarray/LICENSE.txt rename to lodash.isarray/LICENSE diff --git a/lodash.isarray/README.md b/lodash.isarray/README.md index 10dbf2dbe..ea274aae1 100644 --- a/lodash.isarray/README.md +++ b/lodash.isarray/README.md @@ -1,4 +1,4 @@ -# lodash.isarray v3.0.3 +# lodash.isarray v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isArray` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isArray = require('lodash.isarray'); ``` -See the [documentation](https://lodash.com/docs#isArray) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isarray) for more details. +See the [documentation](https://lodash.com/docs#isArray) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isarray) for more details. diff --git a/lodash.isarray/index.js b/lodash.isarray/index.js index 9ab745890..d566e5f61 100644 --- a/lodash.isarray/index.js +++ b/lodash.isarray/index.js @@ -1,42 +1,12 @@ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ +/** `Object#toString` result references. */ /** `Object#toString` result references. */ var arrayTag = '[object Array]', funcTag = '[object Function]'; -/** - * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special). - * In addition to special characters the forward slash is escaped to allow for - * easier `eval` use and `Function` compilation. - */ -var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g, - reHasRegExpChars = RegExp(reRegExpChars.source); - /** Used to detect host constructors (Safari > 5). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - if (typeof value == 'string') { - return value; - } - return value == null ? '' : (value + ''); -} - /** * Checks if `value` is object-like. * @@ -58,14 +28,14 @@ var fnToString = Function.prototype.toString; var hasOwnProperty = objectProto.hasOwnProperty; /** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objToString = objectProto.toString; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + - escapeRegExp(fnToString.call(hasOwnProperty)) + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); @@ -73,7 +43,7 @@ var reIsNative = RegExp('^' + var nativeIsArray = getNative(Array, 'isArray'); /** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -94,7 +64,7 @@ function getNative(object, key) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @private * @param {*} value The value to check. @@ -124,6 +94,56 @@ var isArray = nativeIsArray || function(value) { return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; }; +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 which returns 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + /** * Checks if `value` is a native function. * @@ -144,31 +164,10 @@ function isNative(value) { if (value == null) { return false; } - if (objToString.call(value) == funcTag) { + if (isFunction(value)) { return reIsNative.test(fnToString.call(value)); } return isObjectLike(value) && reIsHostCtor.test(value); } -/** - * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", - * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https:\/\/lodash\.com\/\)' - */ -function escapeRegExp(string) { - string = baseToString(string); - return (string && reHasRegExpChars.test(string)) - ? string.replace(reRegExpChars, '\\$&') - : string; -} - module.exports = isArray; diff --git a/lodash.isarray/package.json b/lodash.isarray/package.json index 5c6740300..03fe00d48 100644 --- a/lodash.isarray/package.json +++ b/lodash.isarray/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isarray", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.isArray` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.iselement/README.md b/lodash.iselement/README.md index bff806ed2..0e0c84602 100644 --- a/lodash.iselement/README.md +++ b/lodash.iselement/README.md @@ -1,4 +1,4 @@ -# lodash.iselement v3.0.3 +# lodash.iselement v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isElement` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isElement = require('lodash.iselement'); ``` -See the [documentation](https://lodash.com/docs#isElement) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.iselement) for more details. +See the [documentation](https://lodash.com/docs#isElement) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.iselement) for more details. diff --git a/lodash.iselement/index.js b/lodash.iselement/index.js index 134a6e73e..998b55252 100644 --- a/lodash.iselement/index.js +++ b/lodash.iselement/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.2 @@ -16,7 +16,7 @@ var isPlainObject = require('lodash.isplainobject'); * @returns {boolean} Returns `true` if `value` is object-like, else `false`. */ function isObjectLike(value) { - return (value && typeof value == 'object') || false; + return !!value && typeof value == 'object'; } /** Used for native method references. */ @@ -26,9 +26,8 @@ var objectProto = Object.prototype; var document = (document = global.window) && document.document; /** - * Used to resolve the `toStringTag` of values. - * See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * for more details. + * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) + * of values. */ var objToString = objectProto.toString; @@ -70,13 +69,13 @@ try { * // => false */ function isElement(value) { - return (value && value.nodeType === 1 && isObjectLike(value) && - (objToString.call(value).indexOf('Element') > -1)) || false; + return !!value && value.nodeType === 1 && isObjectLike(value) && + (objToString.call(value).indexOf('Element') > -1); } // Fallback for environments without DOM support. if (!support.dom) { isElement = function(value) { - return (value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value)) || false; + return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); }; } diff --git a/lodash.iselement/package.json b/lodash.iselement/package.json index d17f425b4..1a8b7e66e 100644 --- a/lodash.iselement/package.json +++ b/lodash.iselement/package.json @@ -1,6 +1,6 @@ { "name": "lodash.iselement", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.isElement` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isempty/README.md b/lodash.isempty/README.md index 687c24d92..f936a4061 100644 --- a/lodash.isempty/README.md +++ b/lodash.isempty/README.md @@ -1,4 +1,4 @@ -# lodash.isempty v3.0.3 +# lodash.isempty v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isEmpty` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isEmpty = require('lodash.isempty'); ``` -See the [documentation](https://lodash.com/docs#isEmpty) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isempty) for more details. +See the [documentation](https://lodash.com/docs#isEmpty) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isempty) for more details. diff --git a/lodash.isempty/index.js b/lodash.isempty/index.js index b7992ce26..e561963fe 100644 --- a/lodash.isempty/index.js +++ b/lodash.isempty/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -24,10 +24,10 @@ function isObjectLike(value) { } /** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. */ -var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; +var MAX_SAFE_INTEGER = 9007199254740991; /** * The base implementation of `_.property` without support for deep paths. @@ -68,7 +68,7 @@ function isArrayLike(value) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @private * @param {*} value The value to check. @@ -79,7 +79,7 @@ function isLength(value) { } /** - * Checks if `value` is empty. A value is considered empty unless it is an + * Checks if `value` is empty. A value is considered empty unless it's an * `arguments` object, array, string, or jQuery-like collection with a length * greater than `0` or an object with own enumerable properties. * diff --git a/lodash.isempty/package.json b/lodash.isempty/package.json index 9ce7924b3..b372b9a3c 100644 --- a/lodash.isempty/package.json +++ b/lodash.isempty/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isempty", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.isEmpty` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isequal/README.md b/lodash.isequal/README.md index b5c40b4ca..d09190d8f 100644 --- a/lodash.isequal/README.md +++ b/lodash.isequal/README.md @@ -1,4 +1,4 @@ -# lodash.isequal v3.0.3 +# lodash.isequal v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isEqual` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isEqual = require('lodash.isequal'); ``` -See the [documentation](https://lodash.com/docs#isEqual) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isequal) for more details. +See the [documentation](https://lodash.com/docs#isEqual) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isequal) for more details. diff --git a/lodash.isequal/index.js b/lodash.isequal/index.js index 221e37f18..214631738 100644 --- a/lodash.isequal/index.js +++ b/lodash.isequal/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -9,24 +9,12 @@ var baseIsEqual = require('lodash._baseisequal'), bindCallback = require('lodash._bindcallback'); -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !isObject(value); -} - /** * Performs a deep comparison between two values to determine if they are - * equivalent. If `customizer` is provided it is invoked to compare values. + * equivalent. If `customizer` is provided it's invoked to compare values. * If `customizer` returns `undefined` comparisons are handled by the method - * instead. The `customizer` is bound to `thisArg` and invoked with three - * arguments: (value, other [, index|key]). + * instead. The `customizer` is bound to `thisArg` and invoked with up to + * three arguments: (value, other [, index|key]). * * **Note:** This method supports comparing arrays, booleans, `Date` objects, * numbers, `Object` objects, regexes, and strings. Objects are compared by @@ -36,6 +24,7 @@ function isStrictComparable(value) { * * @static * @memberOf _ + * @alias eq * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. @@ -65,39 +54,9 @@ function isStrictComparable(value) { * // => true */ function isEqual(value, other, customizer, thisArg) { - customizer = typeof customizer == 'function' && bindCallback(customizer, thisArg, 3); - if (!customizer && isStrictComparable(value) && isStrictComparable(other)) { - return value === other; - } + customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, customizer) : !!result; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return type == 'function' || (!!value && type == 'object'); + return result === undefined ? baseIsEqual(value, other, customizer) : !!result; } module.exports = isEqual; diff --git a/lodash.isequal/package.json b/lodash.isequal/package.json index 797b6bdb8..67f61dc98 100644 --- a/lodash.isequal/package.json +++ b/lodash.isequal/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isequal", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.isEqual` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isfunction/README.md b/lodash.isfunction/README.md index 7349c8d68..86f95de41 100644 --- a/lodash.isfunction/README.md +++ b/lodash.isfunction/README.md @@ -1,4 +1,4 @@ -# lodash.isfunction v3.0.3 +# lodash.isfunction v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isFunction` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isFunction = require('lodash.isfunction'); ``` -See the [documentation](https://lodash.com/docs#isFunction) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isfunction) for more details. +See the [documentation](https://lodash.com/docs#isFunction) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isfunction) for more details. diff --git a/lodash.isfunction/index.js b/lodash.isfunction/index.js index cb1fb402d..6908e5304 100644 --- a/lodash.isfunction/index.js +++ b/lodash.isfunction/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -36,7 +36,7 @@ function baseIsFunction(value) { } /** - * Converts `value` to a string if it is not one. An empty string is returned + * Converts `value` to a string if it's not one. An empty string is returned * for `null` or `undefined` values. * * @private @@ -67,6 +67,9 @@ var objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var fnToString = Function.prototype.toString; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + /** * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) * of values. @@ -75,12 +78,25 @@ var objToString = objectProto.toString; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + - escapeRegExp(objToString) - .replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + escapeRegExp(fnToString.call(hasOwnProperty)) + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** Native method references. */ -var Uint8Array = isNative(Uint8Array = global.Uint8Array) && Uint8Array; +var Uint8Array = getNative(root, 'Uint8Array'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} /** * Checks if `value` is classified as a `Function` object. diff --git a/lodash.isfunction/package.json b/lodash.isfunction/package.json index 39c3f8f66..c4a9ec90e 100644 --- a/lodash.isfunction/package.json +++ b/lodash.isfunction/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isfunction", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.isFunction` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isnative/LICENSE.txt b/lodash.isnative/LICENSE similarity index 100% rename from lodash.isnative/LICENSE.txt rename to lodash.isnative/LICENSE diff --git a/lodash.isnative/README.md b/lodash.isnative/README.md index dc835b335..d6712959a 100644 --- a/lodash.isnative/README.md +++ b/lodash.isnative/README.md @@ -1,4 +1,4 @@ -# lodash.isnative v3.0.3 +# lodash.isnative v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isNative` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isNative = require('lodash.isnative'); ``` -See the [documentation](https://lodash.com/docs#isNative) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isnative) for more details. +See the [documentation](https://lodash.com/docs#isNative) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isnative) for more details. diff --git a/lodash.isnative/index.js b/lodash.isnative/index.js index b41d43d81..3d5c829c1 100644 --- a/lodash.isnative/index.js +++ b/lodash.isnative/index.js @@ -1,41 +1,16 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; - -/** - * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special). - * In addition to special characters the forward slash is escaped to allow for - * easier `eval` use and `Function` compilation. - */ -var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g, - reHasRegExpChars = RegExp(reRegExpChars.source); +var isFunction = require('lodash.isfunction'); /** Used to detect host constructors (Safari > 5). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - if (typeof value == 'string') { - return value; - } - return value == null ? '' : (value + ''); -} - /** * Checks if `value` is object-like. * @@ -56,15 +31,9 @@ var fnToString = Function.prototype.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + - escapeRegExp(fnToString.call(hasOwnProperty)) + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); @@ -88,31 +57,10 @@ function isNative(value) { if (value == null) { return false; } - if (objToString.call(value) == funcTag) { + if (isFunction(value)) { return reIsNative.test(fnToString.call(value)); } return isObjectLike(value) && reIsHostCtor.test(value); } -/** - * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", - * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https:\/\/lodash\.com\/\)' - */ -function escapeRegExp(string) { - string = baseToString(string); - return (string && reHasRegExpChars.test(string)) - ? string.replace(reRegExpChars, '\\$&') - : string; -} - module.exports = isNative; diff --git a/lodash.isnative/package.json b/lodash.isnative/package.json index 75e81a06f..c55d1035e 100644 --- a/lodash.isnative/package.json +++ b/lodash.isnative/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isnative", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.isNative` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -15,5 +15,8 @@ "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, + "dependencies": { + "lodash.isfunction": "^3.0.0" + } } diff --git a/lodash.isregexp/LICENSE b/lodash.isregexp/LICENSE index 9cd87e5dc..b054ca5a3 100644 --- a/lodash.isregexp/LICENSE +++ b/lodash.isregexp/LICENSE @@ -1,5 +1,5 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +Copyright 2012-2016 The Dojo Foundation +Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors Permission is hereby granted, free of charge, to any person obtaining diff --git a/lodash.isregexp/README.md b/lodash.isregexp/README.md index 1439eb58d..fde25320d 100644 --- a/lodash.isregexp/README.md +++ b/lodash.isregexp/README.md @@ -1,20 +1,18 @@ -# lodash.isregexp v3.0.3 +# lodash.isregexp v3.0.4 -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isRegExp` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. +The [lodash](https://lodash.com/) method `_.isRegExp` exported as a [Node.js](https://nodejs.org/) module. ## Installation Using npm: - ```bash $ {sudo -H} npm i -g npm $ npm i --save lodash.isregexp ``` -In Node.js/io.js: - +In Node.js: ```js var isRegExp = require('lodash.isregexp'); ``` -See the [documentation](https://lodash.com/docs#isRegExp) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isregexp) for more details. +See the [documentation](https://lodash.com/docs#isRegExp) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isregexp) for more details. diff --git a/lodash.isregexp/index.js b/lodash.isregexp/index.js index 84812c9d1..a563dda07 100644 --- a/lodash.isregexp/index.js +++ b/lodash.isregexp/index.js @@ -1,23 +1,23 @@ /** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation + * lodash 3.0.4 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ /** `Object#toString` result references. */ var regexpTag = '[object RegExp]'; -/** Used for native method references. */ -var objectProto = Object.prototype; +/** Used for built-in method references. */ +var objectProto = global.Object.prototype; /** * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ -var objToString = objectProto.toString; +var objectToString = objectProto.toString; /** * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. @@ -36,12 +36,13 @@ var objToString = objectProto.toString; * _.isObject([1, 2, 3]); * // => true * - * _.isObject(1); + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); * // => false */ function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; return !!value && (type == 'object' || type == 'function'); } @@ -63,7 +64,7 @@ function isObject(value) { * // => false */ function isRegExp(value) { - return isObject(value) && objToString.call(value) == regexpTag; + return isObject(value) && objectToString.call(value) == regexpTag; } module.exports = isRegExp; diff --git a/lodash.isregexp/package.json b/lodash.isregexp/package.json index 4e595be47..03baaf961 100644 --- a/lodash.isregexp/package.json +++ b/lodash.isregexp/package.json @@ -1,17 +1,15 @@ { "name": "lodash.isregexp", - "version": "3.0.3", - "description": "The modern build of lodash’s `_.isRegExp` as a module.", + "version": "3.0.4", + "description": "The lodash method `_.isRegExp` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util", + "keywords": "lodash, lodash-modularized, stdlib, util, isregexp", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Benjamin Tan (https://d10.github.io/)", - "Blaine Bublitz (http://www.iceddev.com/)", - "Kit Cambridge (http://kitcambridge.be/)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.istypedarray/README.md b/lodash.istypedarray/README.md index c04b2208d..7d0a6c29c 100644 --- a/lodash.istypedarray/README.md +++ b/lodash.istypedarray/README.md @@ -1,4 +1,4 @@ -# lodash.istypedarray v3.0.3 +# lodash.istypedarray v3.0.4 The [lodash](https://lodash.com/) method `_.isTypedArray` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isTypedArray = require('lodash.istypedarray'); ``` -See the [documentation](https://lodash.com/docs#isTypedArray) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.istypedarray) for more details. +See the [documentation](https://lodash.com/docs#isTypedArray) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.istypedarray) for more details. diff --git a/lodash.istypedarray/index.js b/lodash.istypedarray/index.js index 037fd1422..544bbb169 100644 --- a/lodash.istypedarray/index.js +++ b/lodash.istypedarray/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -52,7 +52,7 @@ typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** Used for built-in method references. */ -var objectProto = global.Object.prototype; +var objectProto = Object.prototype; /** * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) diff --git a/lodash.istypedarray/package.json b/lodash.istypedarray/package.json index e8e4c62b6..5ea433f07 100644 --- a/lodash.istypedarray/package.json +++ b/lodash.istypedarray/package.json @@ -1,11 +1,11 @@ { "name": "lodash.istypedarray", - "version": "3.0.3", + "version": "3.0.4", "description": "The lodash method `_.isTypedArray` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, istypedarray", + "keywords": "lodash-modularized, istypedarray", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.keys/LICENSE.txt b/lodash.keys/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.keys/LICENSE.txt +++ b/lodash.keys/LICENSE.txt @@ -1,5 +1,5 @@ Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors Permission is hereby granted, free of charge, to any person obtaining diff --git a/lodash.keys/README.md b/lodash.keys/README.md index 6713a6f69..6f77c26b5 100644 --- a/lodash.keys/README.md +++ b/lodash.keys/README.md @@ -1,4 +1,4 @@ -# lodash.keys v3.0.3 +# lodash.keys v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keys` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var keys = require('lodash.keys'); ``` -See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.keys) for more details. +See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.keys) for more details. diff --git a/lodash.keys/index.js b/lodash.keys/index.js index a1c302d00..c070b0450 100644 --- a/lodash.keys/index.js +++ b/lodash.keys/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 + * Based on Underscore.js 1.8.2 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -178,7 +178,7 @@ var keys = !nativeKeys ? shimKeys : function(object) { length = object.length; } if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object != 'function' && (length && isLength(length)))) { + (typeof object != 'function' && (length && isLength(length)))) { return shimKeys(object); } return isObject(object) ? nativeKeys(object) : []; diff --git a/lodash.keys/package.json b/lodash.keys/package.json index b3b597dd7..a287e9fbc 100644 --- a/lodash.keys/package.json +++ b/lodash.keys/package.json @@ -1,6 +1,6 @@ { "name": "lodash.keys", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.keys` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.keysin/LICENSE.txt b/lodash.keysin/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.keysin/LICENSE.txt +++ b/lodash.keysin/LICENSE.txt @@ -1,5 +1,5 @@ Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors Permission is hereby granted, free of charge, to any person obtaining diff --git a/lodash.keysin/README.md b/lodash.keysin/README.md index 6db633e76..fcfc1c68c 100644 --- a/lodash.keysin/README.md +++ b/lodash.keysin/README.md @@ -1,4 +1,4 @@ -# lodash.keysin v3.0.3 +# lodash.keysin v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keysIn` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var keysIn = require('lodash.keysin'); ``` -See the [documentation](https://lodash.com/docs#keysIn) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.keysin) for more details. +See the [documentation](https://lodash.com/docs#keysIn) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.keysin) for more details. diff --git a/lodash.keysin/index.js b/lodash.keysin/index.js index a018d0441..266fe860e 100644 --- a/lodash.keysin/index.js +++ b/lodash.keysin/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 + * Based on Underscore.js 1.8.2 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -19,9 +19,8 @@ var hasOwnProperty = objectProto.hasOwnProperty; var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** - * Used as the maximum length of an array-like value. - * See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * for more details. + * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * of an array-like value. */ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; @@ -72,9 +71,7 @@ function isIndex(value, length) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on ES `ToLength`. See the - * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) - * for more details. + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). * * @private * @param {*} value The value to check. @@ -85,11 +82,9 @@ function isLength(value) { } /** - * Checks if `value` is the language type of `Object`. + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * - * **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details. - * * @static * @memberOf _ * @category Lang @@ -110,7 +105,7 @@ function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; - return type == 'function' || (value && type == 'object') || false; + return type == 'function' || (!!value && type == 'object'); } /** diff --git a/lodash.keysin/package.json b/lodash.keysin/package.json index 5cccd32ee..27c8ffa5d 100644 --- a/lodash.keysin/package.json +++ b/lodash.keysin/package.json @@ -1,6 +1,6 @@ { "name": "lodash.keysin", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.keysIn` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.memoize/LICENSE.txt b/lodash.memoize/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.memoize/LICENSE.txt +++ b/lodash.memoize/LICENSE.txt @@ -1,5 +1,5 @@ Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors Permission is hereby granted, free of charge, to any person obtaining diff --git a/lodash.memoize/README.md b/lodash.memoize/README.md index c16691780..a417e274a 100644 --- a/lodash.memoize/README.md +++ b/lodash.memoize/README.md @@ -1,4 +1,4 @@ -# lodash.memoize v3.0.3 +# lodash.memoize v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.memoize` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var memoize = require('lodash.memoize'); ``` -See the [documentation](https://lodash.com/docs#memoize) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.memoize) for more details. +See the [documentation](https://lodash.com/docs#memoize) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.memoize) for more details. diff --git a/lodash.memoize/index.js b/lodash.memoize/index.js index e62d69ff6..aef5f16e9 100644 --- a/lodash.memoize/index.js +++ b/lodash.memoize/index.js @@ -1,11 +1,4 @@ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ +/** Used as the `TypeError` message for "Functions" methods. */ /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -94,7 +87,7 @@ function mapSet(key, value) { * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the [`Map`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object) + * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) * method interface of `get`, `has`, and `set`. * * @static @@ -141,14 +134,14 @@ function memoize(func, resolver) { } var memoized = function() { var args = arguments, - cache = memoized.cache, - key = resolver ? resolver.apply(this, args) : args[0]; + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); - cache.set(key, result); + memoized.cache = cache.set(key, result); return result; }; memoized.cache = new memoize.Cache; diff --git a/lodash.memoize/package.json b/lodash.memoize/package.json index 70f15b038..591b2bdfb 100644 --- a/lodash.memoize/package.json +++ b/lodash.memoize/package.json @@ -1,6 +1,6 @@ { "name": "lodash.memoize", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.memoize` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.mixin/LICENSE.txt b/lodash.mixin/LICENSE similarity index 100% rename from lodash.mixin/LICENSE.txt rename to lodash.mixin/LICENSE diff --git a/lodash.mixin/README.md b/lodash.mixin/README.md index 805556db7..d744c4ad0 100644 --- a/lodash.mixin/README.md +++ b/lodash.mixin/README.md @@ -1,4 +1,4 @@ -# lodash.mixin v3.0.3 +# lodash.mixin v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.mixin` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var mixin = require('lodash.mixin'); ``` -See the [documentation](https://lodash.com/docs#mixin) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.mixin) for more details. +See the [documentation](https://lodash.com/docs#mixin) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.mixin) for more details. diff --git a/lodash.mixin/index.js b/lodash.mixin/index.js index df7fa8658..a9402290c 100644 --- a/lodash.mixin/index.js +++ b/lodash.mixin/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -11,11 +11,24 @@ var arrayCopy = require('lodash._arraycopy'), isFunction = require('lodash.isfunction'), keys = require('lodash.keys'); -/** Used for native method references. */ -var arrayProto = Array.prototype; +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; -/** Native method references. */ -var push = arrayProto.push; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} /** * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. @@ -110,9 +123,7 @@ function mixin(object, source, options) { result.__chain__ = chainAll; return result; } - var args = [this.value()]; - push.apply(args, arguments); - return func.apply(object, args); + return func.apply(object, arrayPush([this.value()], arguments)); }; }(func)); } diff --git a/lodash.mixin/package.json b/lodash.mixin/package.json index 48a234fce..e40354b17 100644 --- a/lodash.mixin/package.json +++ b/lodash.mixin/package.json @@ -1,6 +1,6 @@ { "name": "lodash.mixin", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.mixin` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.support/LICENSE.txt b/lodash.support/LICENSE similarity index 100% rename from lodash.support/LICENSE.txt rename to lodash.support/LICENSE diff --git a/lodash.support/README.md b/lodash.support/README.md index 197b1b83b..69e42382b 100644 --- a/lodash.support/README.md +++ b/lodash.support/README.md @@ -1,4 +1,4 @@ -# lodash.support v3.0.3 +# lodash.support v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.support` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var support = require('lodash.support'); ``` -See the [documentation](https://lodash.com/docs#support) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.support) for more details. +See the [documentation](https://lodash.com/docs#support) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.support) for more details. diff --git a/lodash.support/index.js b/lodash.support/index.js index 01b4e5c37..b643dc414 100644 --- a/lodash.support/index.js +++ b/lodash.support/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -7,9 +7,6 @@ * Available under MIT license */ -/** Used to detect DOM support. */ -var document = (document = global.window) ? document.document : null; - /** * An object environment feature flags. * @@ -19,25 +16,4 @@ var document = (document = global.window) ? document.document : null; */ var support = {}; -(function(x) { - var Ctor = function() { this.x = x; }, - object = { '0': x, 'length': x }, - props = []; - - Ctor.prototype = { 'valueOf': x, 'y': x }; - for (var key in new Ctor) { props.push(key); } - - /** - * Detect if the DOM is supported. - * - * @memberOf _.support - * @type boolean - */ - try { - support.dom = document.createDocumentFragment().nodeType === 11; - } catch(e) { - support.dom = false; - } -}(1, 0)); - module.exports = support; diff --git a/lodash.support/package.json b/lodash.support/package.json index e0797432e..f27abc365 100644 --- a/lodash.support/package.json +++ b/lodash.support/package.json @@ -1,6 +1,6 @@ { "name": "lodash.support", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.support` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.throttle/LICENSE.txt b/lodash.throttle/LICENSE similarity index 100% rename from lodash.throttle/LICENSE.txt rename to lodash.throttle/LICENSE diff --git a/lodash.throttle/README.md b/lodash.throttle/README.md index 49b6c9ca3..0c82c525b 100644 --- a/lodash.throttle/README.md +++ b/lodash.throttle/README.md @@ -1,4 +1,4 @@ -# lodash.throttle v3.0.3 +# lodash.throttle v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.throttle` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var throttle = require('lodash.throttle'); ``` -See the [documentation](https://lodash.com/docs#throttle) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.throttle) for more details. +See the [documentation](https://lodash.com/docs#throttle) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.throttle) for more details. diff --git a/lodash.throttle/index.js b/lodash.throttle/index.js index b3239e706..ec1f9fb50 100644 --- a/lodash.throttle/index.js +++ b/lodash.throttle/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -11,13 +11,6 @@ var debounce = require('lodash.debounce'); /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; -/** Used as an internal `_.debounce` options object by `_.throttle`. */ -var debounceOptions = { - 'leading': false, - 'maxWait': 0, - 'trailing': false -}; - /** * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` @@ -70,10 +63,7 @@ function throttle(func, wait, options) { leading = 'leading' in options ? !!options.leading : leading; trailing = 'trailing' in options ? !!options.trailing : trailing; } - debounceOptions.leading = leading; - debounceOptions.maxWait = +wait; - debounceOptions.trailing = trailing; - return debounce(func, wait, debounceOptions); + return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); } /** diff --git a/lodash.throttle/package.json b/lodash.throttle/package.json index b3e8f5826..487f3de21 100644 --- a/lodash.throttle/package.json +++ b/lodash.throttle/package.json @@ -1,6 +1,6 @@ { "name": "lodash.throttle", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.throttle` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.transform/LICENSE.txt b/lodash.transform/LICENSE similarity index 100% rename from lodash.transform/LICENSE.txt rename to lodash.transform/LICENSE diff --git a/lodash.transform/README.md b/lodash.transform/README.md index 044852b34..b6f00f0b2 100644 --- a/lodash.transform/README.md +++ b/lodash.transform/README.md @@ -1,4 +1,4 @@ -# lodash.transform v3.0.3 +# lodash.transform v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.transform` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var transform = require('lodash.transform'); ``` -See the [documentation](https://lodash.com/docs#transform) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.transform) for more details. +See the [documentation](https://lodash.com/docs#transform) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.transform) for more details. diff --git a/lodash.transform/index.js b/lodash.transform/index.js index 220fd418a..ce9695fa6 100644 --- a/lodash.transform/index.js +++ b/lodash.transform/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -94,7 +94,7 @@ function transform(object, iteratee, accumulator, thisArg) { if (isArr) { accumulator = isArray(object) ? new Ctor : []; } else { - accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : null); + accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined); } } else { accumulator = {}; diff --git a/lodash.transform/package.json b/lodash.transform/package.json index a321b865d..125e95ed1 100644 --- a/lodash.transform/package.json +++ b/lodash.transform/package.json @@ -1,6 +1,6 @@ { "name": "lodash.transform", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.transform` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.trimleft/README.md b/lodash.trimleft/README.md index 8832e0f4a..9f94770fc 100644 --- a/lodash.trimleft/README.md +++ b/lodash.trimleft/README.md @@ -1,4 +1,4 @@ -# lodash.trimleft v3.0.3 +# lodash.trimleft v3.0.4 The [lodash](https://lodash.com/) method `_.trimLeft` exported as a [Node.js](https://nodejs.org/) module. @@ -21,4 +21,4 @@ In Node.js/io.js: var trimLeft = require('lodash.trimleft'); ``` -See the [documentation](https://lodash.com/docs#trimLeft) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.trimleft) for more details. +See the [documentation](https://lodash.com/docs#trimLeft) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.trimleft) for more details. diff --git a/lodash.trimleft/index.js b/lodash.trimleft/index.js index 249b19501..70c4b1ff9 100644 --- a/lodash.trimleft/index.js +++ b/lodash.trimleft/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.7.0 diff --git a/lodash.trimleft/package.json b/lodash.trimleft/package.json index e415f0358..c61e83a27 100644 --- a/lodash.trimleft/package.json +++ b/lodash.trimleft/package.json @@ -1,17 +1,14 @@ { "name": "lodash.trimleft", - "version": "3.0.3", - "description": "The modern build of lodash’s `_.trimLeft` as a module.", + "version": "3.0.4", + "description": "The lodash method `_.trimLeft` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Benjamin Tan (https://d10.github.io/)", - "Blaine Bublitz (http://www.iceddev.com/)", - "Kit Cambridge (http://kitcambridge.be/)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.trimright/README.md b/lodash.trimright/README.md index b4aeb9441..fb80adb3d 100644 --- a/lodash.trimright/README.md +++ b/lodash.trimright/README.md @@ -1,4 +1,4 @@ -# lodash.trimright v3.0.3 +# lodash.trimright v3.0.4 The [lodash](https://lodash.com/) method `_.trimRight` exported as a [Node.js](https://nodejs.org/) module. @@ -21,4 +21,4 @@ In Node.js/io.js: var trimRight = require('lodash.trimright'); ``` -See the [documentation](https://lodash.com/docs#trimRight) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.trimright) for more details. +See the [documentation](https://lodash.com/docs#trimRight) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.trimright) for more details. diff --git a/lodash.trimright/index.js b/lodash.trimright/index.js index fe8e43cf5..bb451bf4f 100644 --- a/lodash.trimright/index.js +++ b/lodash.trimright/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.7.0 diff --git a/lodash.trimright/package.json b/lodash.trimright/package.json index 338e14770..fdb1491a0 100644 --- a/lodash.trimright/package.json +++ b/lodash.trimright/package.json @@ -1,17 +1,14 @@ { "name": "lodash.trimright", - "version": "3.0.3", - "description": "The modern build of lodash’s `_.trimRight` as a module.", + "version": "3.0.4", + "description": "The lodash method `_.trimRight` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Benjamin Tan (https://d10.github.io/)", - "Blaine Bublitz (http://www.iceddev.com/)", - "Kit Cambridge (http://kitcambridge.be/)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.trunc/LICENSE.txt b/lodash.trunc/LICENSE similarity index 100% rename from lodash.trunc/LICENSE.txt rename to lodash.trunc/LICENSE diff --git a/lodash.trunc/README.md b/lodash.trunc/README.md index 5006ad328..8baa33592 100644 --- a/lodash.trunc/README.md +++ b/lodash.trunc/README.md @@ -1,4 +1,4 @@ -# lodash.trunc v3.0.3 +# lodash.trunc v3.0.4 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.trunc` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var trunc = require('lodash.trunc'); ``` -See the [documentation](https://lodash.com/docs#trunc) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.trunc) for more details. +See the [documentation](https://lodash.com/docs#trunc) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.trunc) for more details. diff --git a/lodash.trunc/index.js b/lodash.trunc/index.js index cd63fc38b..f3fc885f2 100644 --- a/lodash.trunc/index.js +++ b/lodash.trunc/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.3 (Custom Build) + * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -86,7 +86,7 @@ function isObject(value) { */ function trunc(string, options, guard) { if (guard && isIterateeCall(string, options, guard)) { - options = null; + options = undefined; } var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; diff --git a/lodash.trunc/package.json b/lodash.trunc/package.json index fb4a4af22..781c07fc3 100644 --- a/lodash.trunc/package.json +++ b/lodash.trunc/package.json @@ -1,6 +1,6 @@ { "name": "lodash.trunc", - "version": "3.0.3", + "version": "3.0.4", "description": "The modern build of lodash’s `_.trunc` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg",