From 415e8ce0ed31067709e9af4ceea062c68d066451 Mon Sep 17 00:00:00 2001 From: jdalton Date: Fri, 13 Feb 2015 09:18:57 -0800 Subject: [PATCH] Bump to v3.0.3. --- README.md | 2 +- lodash._baseat/README.md | 4 +- lodash._baseat/index.js | 8 +- lodash._baseat/package.json | 2 +- lodash._basecreate/{LICENSE.txt => LICENSE} | 0 lodash._basecreate/README.md | 4 +- lodash._basecreate/index.js | 4 +- lodash._basecreate/package.json | 2 +- .../LICENSE | 0 lodash._basedifference/README.md | 4 +- lodash._basedifference/index.js | 9 +- lodash._basedifference/package.json | 2 +- lodash._baseeach/README.md | 4 +- lodash._baseeach/index.js | 33 +++++++- lodash._baseeach/package.json | 2 +- lodash._baseeachright/README.md | 4 +- lodash._baseeachright/index.js | 12 +-- lodash._baseeachright/package.json | 2 +- .../LICENSE | 0 lodash._basefor/README.md | 10 +-- lodash._basefor/index.js | 65 +++------------ lodash._basefor/package.json | 8 +- lodash._baseisequal/README.md | 4 +- lodash._baseisequal/index.js | 76 +++++++++-------- lodash._baseisequal/package.json | 2 +- lodash._basereduce/README.md | 18 ---- lodash._basereduce/index.js | 32 ------- lodash._basereduce/package.json | 16 ---- lodash._baseslice/README.md | 4 +- lodash._baseslice/index.js | 6 +- lodash._baseslice/package.json | 2 +- .../LICENSE.txt => lodash._baseuniq/LICENSE | 0 lodash._baseuniq/LICENSE.txt | 22 ----- lodash._baseuniq/README.md | 4 +- lodash._baseuniq/index.js | 11 ++- lodash._baseuniq/package.json | 2 +- .../LICENSE | 0 lodash._binaryindexby/README.md | 4 +- lodash._binaryindexby/index.js | 10 +-- lodash._binaryindexby/package.json | 2 +- lodash._createwrapper/README.md | 4 +- lodash._createwrapper/index.js | 16 ++-- lodash._createwrapper/package.json | 2 +- lodash._isiterateecall/README.md | 4 +- lodash._isiterateecall/index.js | 11 ++- lodash._isiterateecall/package.json | 2 +- lodash._toiterable/README.md | 4 +- lodash._toiterable/index.js | 17 +++- lodash._toiterable/package.json | 2 +- .../LICENSE.txt => lodash.before/LICENSE | 0 lodash.before/README.md | 4 +- lodash.before/index.js | 13 +-- lodash.before/package.json | 2 +- .../LICENSE.txt => lodash.clone/LICENSE | 0 lodash.clone/README.md | 4 +- lodash.clone/index.js | 8 +- lodash.clone/package.json | 2 +- lodash.debounce/LICENSE.txt | 2 +- lodash.debounce/README.md | 4 +- lodash.debounce/index.js | 8 +- lodash.debounce/package.json | 2 +- lodash.foreach/README.md | 4 +- lodash.foreach/index.js | 10 +-- lodash.foreach/package.json | 2 +- .../LICENSE.txt => lodash.indexof/LICENSE | 0 lodash.indexof/README.md | 4 +- lodash.indexof/index.js | 15 ++-- lodash.indexof/package.json | 2 +- lodash.intersection/LICENSE.txt | 2 +- lodash.intersection/README.md | 4 +- lodash.intersection/index.js | 11 ++- lodash.intersection/package.json | 2 +- lodash.isarguments/README.md | 4 +- lodash.isarguments/index.js | 4 +- lodash.isarguments/package.json | 2 +- lodash.isarray/README.md | 4 +- lodash.isarray/index.js | 28 +++++-- lodash.isarray/package.json | 2 +- lodash.isboolean/README.md | 4 +- lodash.isboolean/index.js | 11 ++- lodash.isboolean/package.json | 4 +- lodash.isdate/README.md | 4 +- lodash.isdate/index.js | 12 ++- lodash.isdate/package.json | 4 +- lodash.iselement/LICENSE.txt | 2 +- lodash.iselement/README.md | 4 +- lodash.iselement/index.js | 6 +- lodash.iselement/package.json | 2 +- lodash.isempty/README.md | 4 +- lodash.isempty/index.js | 20 +++-- lodash.isempty/package.json | 2 +- lodash.isequal/README.md | 4 +- lodash.isequal/index.js | 4 +- lodash.isequal/package.json | 2 +- lodash.iserror/README.md | 4 +- lodash.iserror/index.js | 4 +- lodash.iserror/package.json | 4 +- lodash.isfunction/README.md | 4 +- lodash.isfunction/index.js | 16 ++-- lodash.isfunction/package.json | 2 +- lodash.isnative/README.md | 4 +- lodash.isnative/index.js | 11 ++- lodash.isnative/package.json | 2 +- lodash.isnumber/README.md | 4 +- lodash.isnumber/index.js | 15 ++-- lodash.isnumber/package.json | 4 +- .../LICENSE.txt => lodash.isregexp/LICENSE | 0 lodash.isregexp/README.md | 4 +- lodash.isregexp/index.js | 44 ++++++---- lodash.isregexp/package.json | 2 +- .../LICENSE | 4 +- lodash.istypedarray/README.md | 10 +-- lodash.istypedarray/index.js | 83 +++++++++++++------ lodash.istypedarray/package.json | 10 +-- lodash.keys/README.md | 4 +- lodash.keys/index.js | 4 +- lodash.keys/package.json | 2 +- lodash.keysin/README.md | 4 +- lodash.keysin/index.js | 4 +- lodash.keysin/package.json | 2 +- lodash.memoize/README.md | 4 +- lodash.memoize/index.js | 19 ++--- lodash.memoize/package.json | 2 +- lodash.merge/LICENSE.txt | 2 +- lodash.merge/README.md | 4 +- lodash.merge/index.js | 8 +- lodash.merge/package.json | 2 +- lodash.mixin/README.md | 4 +- lodash.mixin/index.js | 9 +- lodash.mixin/package.json | 2 +- lodash.support/README.md | 4 +- lodash.support/index.js | 29 +------ lodash.support/package.json | 2 +- lodash.throttle/README.md | 4 +- lodash.throttle/index.js | 18 ++-- lodash.throttle/package.json | 2 +- lodash.times/{LICENSE.txt => LICENSE} | 0 lodash.times/README.md | 4 +- lodash.times/index.js | 10 +-- lodash.times/package.json | 2 +- lodash.transform/README.md | 4 +- lodash.transform/index.js | 8 +- lodash.transform/package.json | 2 +- lodash.trimleft/LICENSE | 23 +++++ lodash.trimleft/LICENSE.txt | 22 ----- lodash.trimleft/README.md | 10 ++- lodash.trimleft/index.js | 2 +- lodash.trimleft/package.json | 2 +- lodash.trimright/LICENSE | 23 +++++ lodash.trimright/LICENSE.txt | 22 ----- lodash.trimright/README.md | 10 ++- lodash.trimright/index.js | 2 +- lodash.trimright/package.json | 2 +- lodash.trunc/README.md | 4 +- lodash.trunc/index.js | 8 +- lodash.trunc/package.json | 2 +- 156 files changed, 599 insertions(+), 625 deletions(-) rename lodash._basecreate/{LICENSE.txt => LICENSE} (100%) rename lodash._basefor/LICENSE.txt => lodash._basedifference/LICENSE (100%) rename {lodash._basereduce => lodash._basefor}/LICENSE (100%) delete mode 100644 lodash._basereduce/README.md delete mode 100644 lodash._basereduce/index.js delete mode 100644 lodash._basereduce/package.json rename lodash._binaryindexby/LICENSE.txt => lodash._baseuniq/LICENSE (100%) delete mode 100644 lodash._baseuniq/LICENSE.txt rename lodash.before/LICENSE.txt => lodash._binaryindexby/LICENSE (100%) rename lodash.clone/LICENSE.txt => lodash.before/LICENSE (100%) rename lodash.indexof/LICENSE.txt => lodash.clone/LICENSE (100%) rename lodash.isregexp/LICENSE.txt => lodash.indexof/LICENSE (100%) rename lodash.istypedarray/LICENSE.txt => lodash.isregexp/LICENSE (100%) rename lodash._basedifference/LICENSE.txt => lodash.istypedarray/LICENSE (89%) rename lodash.times/{LICENSE.txt => LICENSE} (100%) create mode 100644 lodash.trimleft/LICENSE delete mode 100644 lodash.trimleft/LICENSE.txt create mode 100644 lodash.trimright/LICENSE delete mode 100644 lodash.trimright/LICENSE.txt diff --git a/README.md b/README.md index c59bc8f01..1fcfe62fa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v3.0.2 +# lodash v3.0.3 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 c5156e050..5ddb033c5 100644 --- a/lodash._baseat/README.md +++ b/lodash._baseat/README.md @@ -1,4 +1,4 @@ -# lodash._baseat v3.0.2 +# lodash._baseat v3.0.3 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.2-npm-packages/lodash._baseat) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseat) for more details. diff --git a/lodash._baseat/index.js b/lodash._baseat/index.js index ee014bdd9..f570f2242 100644 --- a/lodash._baseat/index.js +++ b/lodash._baseat/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -11,7 +11,7 @@ * 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; +var MAX_SAFE_INTEGER = 9007199254740991; /** * The base implementation of `_.at` without support for string collections @@ -26,7 +26,7 @@ function baseAt(collection, props) { var index = -1, isNil = collection == null, isArr = !isNil && isArrayLike(collection), - length = isArr && collection.length, + length = isArr ? collection.length : 0, propsLength = props.length, result = Array(propsLength); @@ -86,7 +86,7 @@ function isArrayLike(value) { * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { - value = +value; + value = typeof value == 'number' ? value : parseFloat(value); length = length == null ? MAX_SAFE_INTEGER : length; return value > -1 && value % 1 == 0 && value < length; } diff --git a/lodash._baseat/package.json b/lodash._baseat/package.json index ae46217a6..492f2655f 100644 --- a/lodash._baseat/package.json +++ b/lodash._baseat/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseat", - "version": "3.0.2", + "version": "3.0.3", "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._basecreate/LICENSE.txt b/lodash._basecreate/LICENSE similarity index 100% rename from lodash._basecreate/LICENSE.txt rename to lodash._basecreate/LICENSE diff --git a/lodash._basecreate/README.md b/lodash._basecreate/README.md index 82140c3d0..ab0232868 100644 --- a/lodash._basecreate/README.md +++ b/lodash._basecreate/README.md @@ -1,4 +1,4 @@ -# lodash._basecreate v3.0.2 +# lodash._basecreate v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseCreate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseCreate = require('lodash._basecreate'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._basecreate) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._basecreate) for more details. diff --git a/lodash._basecreate/index.js b/lodash._basecreate/index.js index dc7ace497..df1157577 100644 --- a/lodash._basecreate/index.js +++ b/lodash._basecreate/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -21,7 +21,7 @@ var baseCreate = (function() { if (isObject(prototype)) { object.prototype = prototype; var result = new object; - object.prototype = null; + object.prototype = undefined; } return result || {}; }; diff --git a/lodash._basecreate/package.json b/lodash._basecreate/package.json index cd25304f8..47d40d4ef 100644 --- a/lodash._basecreate/package.json +++ b/lodash._basecreate/package.json @@ -1,6 +1,6 @@ { "name": "lodash._basecreate", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s internal `baseCreate` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._basefor/LICENSE.txt b/lodash._basedifference/LICENSE similarity index 100% rename from lodash._basefor/LICENSE.txt rename to lodash._basedifference/LICENSE diff --git a/lodash._basedifference/README.md b/lodash._basedifference/README.md index 6b84e00a3..d9b809cfd 100644 --- a/lodash._basedifference/README.md +++ b/lodash._basedifference/README.md @@ -1,4 +1,4 @@ -# lodash._basedifference v3.0.2 +# lodash._basedifference v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseDifference` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseDifference = require('lodash._basedifference'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._basedifference) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._basedifference) for more details. diff --git a/lodash._basedifference/index.js b/lodash._basedifference/index.js index 3e4435ef6..43c6460fd 100644 --- a/lodash._basedifference/index.js +++ b/lodash._basedifference/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -10,6 +10,9 @@ var baseIndexOf = require('lodash._baseindexof'), cacheIndexOf = require('lodash._cacheindexof'), createCache = require('lodash._createcache'); +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + /** * The base implementation of `_.difference` which accepts a single array * of values to exclude. @@ -29,7 +32,7 @@ function baseDifference(array, values) { var index = -1, indexOf = baseIndexOf, isCommon = true, - cache = (isCommon && values.length >= 200) ? createCache(values) : null, + cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null, valuesLength = values.length; if (cache) { diff --git a/lodash._basedifference/package.json b/lodash._basedifference/package.json index 58d830af9..af0ac2c21 100644 --- a/lodash._basedifference/package.json +++ b/lodash._basedifference/package.json @@ -1,6 +1,6 @@ { "name": "lodash._basedifference", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s internal `baseDifference` 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 dde32fba2..ba0fee04c 100644 --- a/lodash._baseeach/README.md +++ b/lodash._baseeach/README.md @@ -1,4 +1,4 @@ -# lodash._baseeach v3.0.2 +# lodash._baseeach v3.0.3 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.2-npm-packages/lodash._baseeach) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseeach) for more details. diff --git a/lodash._baseeach/index.js b/lodash._baseeach/index.js index 2d4d6102f..0873c3af6 100644 --- a/lodash._baseeach/index.js +++ b/lodash._baseeach/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -28,7 +28,7 @@ var baseEach = createBaseEach(baseForOwn); /** * The base implementation of `baseForIn` and `baseForOwn` which iterates * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iterator functions may exit iteration early by explicitly + * each property. Iteratee functions may exit iteration early by explicitly * returning `false`. * * @private @@ -52,6 +52,19 @@ function baseForOwn(object, iteratee) { return baseFor(object, iteratee, keys); } +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + /** * Creates a `baseEach` or `baseEachRight` function. * @@ -62,7 +75,7 @@ function baseForOwn(object, iteratee) { */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { - var length = collection ? collection.length : 0; + var length = collection ? getLength(collection) : 0; if (!isLength(length)) { return eachFunc(collection, iteratee); } @@ -102,6 +115,18 @@ function createBaseFor(fromRight) { }; } +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + /** * Checks if `value` is a valid array-like length. * diff --git a/lodash._baseeach/package.json b/lodash._baseeach/package.json index b440a1d5d..1741f1153 100644 --- a/lodash._baseeach/package.json +++ b/lodash._baseeach/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseeach", - "version": "3.0.2", + "version": "3.0.3", "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._baseeachright/README.md b/lodash._baseeachright/README.md index cd7d7feb7..a625e24ca 100644 --- a/lodash._baseeachright/README.md +++ b/lodash._baseeachright/README.md @@ -1,4 +1,4 @@ -# lodash._baseeachright v3.0.2 +# lodash._baseeachright v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseEachRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseEachRight = require('lodash._baseeachright'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseeachright) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseeachright) for more details. diff --git a/lodash._baseeachright/index.js b/lodash._baseeachright/index.js index 0c13fc406..3034ba011 100644 --- a/lodash._baseeachright/index.js +++ b/lodash._baseeachright/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -10,10 +10,10 @@ var baseForRight = require('lodash._baseforright'), 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 `_.forEachRight` without support for callback @@ -93,7 +93,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. @@ -104,7 +104,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. @@ -138,7 +138,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 = baseEachRight; diff --git a/lodash._baseeachright/package.json b/lodash._baseeachright/package.json index 8c79017c5..c7b7e9f89 100644 --- a/lodash._baseeachright/package.json +++ b/lodash._baseeachright/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseeachright", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s internal `baseEachRight` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._basereduce/LICENSE b/lodash._basefor/LICENSE similarity index 100% rename from lodash._basereduce/LICENSE rename to lodash._basefor/LICENSE diff --git a/lodash._basefor/README.md b/lodash._basefor/README.md index d9e33731b..b17e221b1 100644 --- a/lodash._basefor/README.md +++ b/lodash._basefor/README.md @@ -1,20 +1,18 @@ -# lodash._basefor v3.0.2 +# lodash._basefor v3.0.3 -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseFor` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. +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/io.js: - +In Node.js: ```js var baseFor = require('lodash._basefor'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._basefor) for more details. +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 index a3d7dcd10..0b9b1f0a8 100644 --- a/lodash._basefor/index.js +++ b/lodash._basefor/index.js @@ -1,17 +1,16 @@ /** - * lodash 3.0.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation + * 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-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ /** - * The base implementation of `baseForIn` and `baseForOwn` which iterates - * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iteratee functions may exit iteration early by explicitly - * returning `false`. + * 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. @@ -22,7 +21,7 @@ var baseFor = createBaseFor(); /** - * Creates a base function for `_.forIn` or `_.forInRight`. + * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. @@ -30,13 +29,13 @@ var baseFor = createBaseFor(); */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { - var iterable = toObject(object), + var index = -1, + iterable = Object(object), props = keysFunc(object), - length = props.length, - index = fromRight ? length : -1; + length = props.length; - while ((fromRight ? index-- : ++index < length)) { - var key = props[index]; + while (length--) { + var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } @@ -45,42 +44,4 @@ function createBaseFor(fromRight) { }; } -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -/** - * 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'); -} - module.exports = baseFor; diff --git a/lodash._basefor/package.json b/lodash._basefor/package.json index 283cd3191..ef3042c2a 100644 --- a/lodash._basefor/package.json +++ b/lodash._basefor/package.json @@ -1,16 +1,14 @@ { "name": "lodash._basefor", - "version": "3.0.2", - "description": "The modern build of lodash’s internal `baseFor` as a module.", + "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/)", - "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._baseisequal/README.md b/lodash._baseisequal/README.md index 290938f1b..e4f895eb2 100644 --- a/lodash._baseisequal/README.md +++ b/lodash._baseisequal/README.md @@ -1,4 +1,4 @@ -# lodash._baseisequal v3.0.2 +# lodash._baseisequal v3.0.3 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.2-npm-packages/lodash._baseisequal) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseisequal) for more details. diff --git a/lodash._baseisequal/index.js b/lodash._baseisequal/index.js index 572e20b25..019c5f03d 100644 --- a/lodash._baseisequal/index.js +++ b/lodash._baseisequal/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -16,6 +16,7 @@ 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]', @@ -28,9 +29,8 @@ var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; /** - * 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; @@ -42,12 +42,12 @@ var objToString = objectProto.toString; * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isWhere] Specify performing partial comparisons. + * @param {boolean} [isLoose] Specify performing partial comparisons. * @param {Array} [stackA] Tracks traversed `value` objects. * @param {Array} [stackB] Tracks traversed `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ -function baseIsEqual(value, other, customizer, isWhere, stackA, stackB) { +function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { // Exit early for identical values. if (value === other) { // Treat `+0` vs. `-0` as not equal. @@ -62,7 +62,7 @@ function baseIsEqual(value, other, customizer, isWhere, stackA, stackB) { // Return `false` unless both values are `NaN`. return value !== value && other !== other; } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, isWhere, stackA, stackB); + return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); } /** @@ -75,12 +75,12 @@ function baseIsEqual(value, other, customizer, isWhere, stackA, stackB) { * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparing objects. - * @param {boolean} [isWhere] Specify performing partial comparisons. + * @param {boolean} [isLoose] Specify performing partial comparisons. * @param {Array} [stackA=[]] Tracks traversed `value` objects. * @param {Array} [stackB=[]] Tracks traversed `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -function baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA, stackB) { +function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, @@ -102,21 +102,27 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA, othIsArr = isTypedArray(other); } } - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, + var objIsObj = (objTag == objectTag || (isLoose && objTag == funcTag)), + othIsObj = (othTag == objectTag || (isLoose && othTag == funcTag)), isSameTag = objTag == othTag; if (isSameTag && !(objIsArr || objIsObj)) { return equalByTag(object, other, objTag); } - var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + if (isLoose) { + if (!isSameTag && !(objIsObj && othIsObj)) { + return false; + } + } else { + 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, isWhere, stackA, stackB); - } - if (!isSameTag) { - return false; + if (valWrapped || othWrapped) { + return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + } + if (!isSameTag) { + return false; + } } // Assume cyclic values are equal. // For more information on detecting circular references see https://es5.github.io/#JO. @@ -133,7 +139,7 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA, stackA.push(object); stackB.push(other); - var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isWhere, stackA, stackB); + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); stackA.pop(); stackB.pop(); @@ -150,18 +156,18 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA, * @param {Array} other The other array to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparing arrays. - * @param {boolean} [isWhere] Specify performing partial comparisons. + * @param {boolean} [isLoose] Specify performing partial comparisons. * @param {Array} [stackA] Tracks traversed `value` objects. * @param {Array} [stackB] Tracks traversed `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ -function equalArrays(array, other, equalFunc, customizer, isWhere, stackA, stackB) { +function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { var index = -1, arrLength = array.length, othLength = other.length, result = true; - if (arrLength != othLength && !(isWhere && othLength > arrLength)) { + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { return false; } // Deep compare the contents, ignoring non-numeric properties. @@ -171,23 +177,23 @@ function equalArrays(array, other, equalFunc, customizer, isWhere, stackA, stack result = undefined; if (customizer) { - result = isWhere + result = isLoose ? customizer(othValue, arrValue, index) : customizer(arrValue, othValue, index); } if (typeof result == 'undefined') { // Recursively compare arrays (susceptible to call stack limits). - if (isWhere) { + if (isLoose) { var othIndex = othLength; while (othIndex--) { othValue = other[othIndex]; - result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isWhere, stackA, stackB); + result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); if (result) { break; } } } else { - result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isWhere, stackA, stackB); + result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); } } } @@ -243,26 +249,26 @@ function equalByTag(object, other, tag) { * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isWhere] Specify performing partial comparisons. + * @param {boolean} [isLoose] Specify performing partial comparisons. * @param {Array} [stackA] Tracks traversed `value` objects. * @param {Array} [stackB] Tracks traversed `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -function equalObjects(object, other, equalFunc, customizer, isWhere, stackA, stackB) { +function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { var objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length; - if (objLength != othLength && !isWhere) { + if (objLength != othLength && !isLoose) { return false; } - var hasCtor, + var skipCtor = isLoose, index = -1; while (++index < objLength) { var key = objProps[index], - result = hasOwnProperty.call(other, key); + result = isLoose ? key in other : hasOwnProperty.call(other, key); if (result) { var objValue = object[key], @@ -270,21 +276,21 @@ function equalObjects(object, other, equalFunc, customizer, isWhere, stackA, sta result = undefined; if (customizer) { - result = isWhere + result = isLoose ? customizer(othValue, objValue, key) : customizer(objValue, othValue, key); } if (typeof result == 'undefined') { // Recursively compare objects (susceptible to call stack limits). - result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isWhere, stackA, stackB); + result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB); } } if (!result) { return false; } - hasCtor || (hasCtor = key == 'constructor'); + skipCtor || (skipCtor = key == 'constructor'); } - if (!hasCtor) { + if (!skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; diff --git a/lodash._baseisequal/package.json b/lodash._baseisequal/package.json index b787f0ee4..9d5682c09 100644 --- a/lodash._baseisequal/package.json +++ b/lodash._baseisequal/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseisequal", - "version": "3.0.2", + "version": "3.0.3", "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._basereduce/README.md b/lodash._basereduce/README.md deleted file mode 100644 index 5c9fd7f8c..000000000 --- a/lodash._basereduce/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash._basereduce v3.0.2 - -The internal [lodash](https://lodash.com/) function `baseReduce` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._basereduce -``` - -In Node.js: -```js -var baseReduce = require('lodash._basereduce'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._basereduce) for more details. diff --git a/lodash._basereduce/index.js b/lodash._basereduce/index.js deleted file mode 100644 index 111cd2b8d..000000000 --- a/lodash._basereduce/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * lodash 3.0.2 (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 `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -module.exports = baseReduce; diff --git a/lodash._basereduce/package.json b/lodash._basereduce/package.json deleted file mode 100644 index e101093e5..000000000 --- a/lodash._basereduce/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "lodash._basereduce", - "version": "3.0.2", - "description": "The internal lodash function `baseReduce` 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._baseslice/README.md b/lodash._baseslice/README.md index ee4b9718b..bfcebc3ba 100644 --- a/lodash._baseslice/README.md +++ b/lodash._baseslice/README.md @@ -1,4 +1,4 @@ -# lodash._baseslice v3.0.2 +# lodash._baseslice v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseSlice` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseSlice = require('lodash._baseslice'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseslice) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseslice) for more details. diff --git a/lodash._baseslice/index.js b/lodash._baseslice/index.js index 598015d19..148a3cf60 100644 --- a/lodash._baseslice/index.js +++ b/lodash._baseslice/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -24,7 +24,7 @@ function baseSlice(array, start, end) { if (start < 0) { start = -start > length ? 0 : (length + start); } - end = (typeof end == 'undefined' || end > length) ? length : (+end || 0); + end = (end === undefined || end > length) ? length : (+end || 0); if (end < 0) { end += length; } diff --git a/lodash._baseslice/package.json b/lodash._baseslice/package.json index 0ef700111..7dac1f405 100644 --- a/lodash._baseslice/package.json +++ b/lodash._baseslice/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseslice", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s internal `baseSlice` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._binaryindexby/LICENSE.txt b/lodash._baseuniq/LICENSE similarity index 100% rename from lodash._binaryindexby/LICENSE.txt rename to lodash._baseuniq/LICENSE diff --git a/lodash._baseuniq/LICENSE.txt b/lodash._baseuniq/LICENSE.txt deleted file mode 100644 index 17764328c..000000000 --- a/lodash._baseuniq/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 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._baseuniq/README.md b/lodash._baseuniq/README.md index 01e56d111..ad71873dc 100644 --- a/lodash._baseuniq/README.md +++ b/lodash._baseuniq/README.md @@ -1,4 +1,4 @@ -# lodash._baseuniq v3.0.2 +# lodash._baseuniq v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseUniq` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseUniq = require('lodash._baseuniq'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._baseuniq) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._baseuniq) for more details. diff --git a/lodash._baseuniq/index.js b/lodash._baseuniq/index.js index 264b0a731..f6736d078 100644 --- a/lodash._baseuniq/index.js +++ b/lodash._baseuniq/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -10,6 +10,9 @@ var baseIndexOf = require('lodash._baseindexof'), cacheIndexOf = require('lodash._cacheindexof'), createCache = require('lodash._createcache'); +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + /** * The base implementation of `_.uniq` without support for callback shorthands * and `this` binding. @@ -17,14 +20,14 @@ var baseIndexOf = require('lodash._baseindexof'), * @private * @param {Array} array The array to inspect. * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate-value-free array. + * @returns {Array} Returns the new duplicate free array. */ function baseUniq(array, iteratee) { var index = -1, indexOf = baseIndexOf, length = array.length, isCommon = true, - isLarge = isCommon && length >= 200, + isLarge = isCommon && length >= LARGE_ARRAY_SIZE, seen = isLarge ? createCache() : null, result = []; diff --git a/lodash._baseuniq/package.json b/lodash._baseuniq/package.json index 013540a2f..eddb9e12e 100644 --- a/lodash._baseuniq/package.json +++ b/lodash._baseuniq/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseuniq", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s internal `baseUniq` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.before/LICENSE.txt b/lodash._binaryindexby/LICENSE similarity index 100% rename from lodash.before/LICENSE.txt rename to lodash._binaryindexby/LICENSE diff --git a/lodash._binaryindexby/README.md b/lodash._binaryindexby/README.md index d32643420..6527ac136 100644 --- a/lodash._binaryindexby/README.md +++ b/lodash._binaryindexby/README.md @@ -1,4 +1,4 @@ -# lodash._binaryindexby v3.0.2 +# lodash._binaryindexby v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `binaryIndexBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var binaryIndexBy = require('lodash._binaryindexby'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash._binaryindexby) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._binaryindexby) for more details. diff --git a/lodash._binaryindexby/index.js b/lodash._binaryindexby/index.js index 6a9531414..9c4b1764c 100644 --- a/lodash._binaryindexby/index.js +++ b/lodash._binaryindexby/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -7,11 +7,9 @@ * Available under MIT license */ -/** Native method references. */ -var floor = Math.floor; - /* Native method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; +var nativeFloor = Math.floor, + nativeMin = Math.min; /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295, @@ -40,7 +38,7 @@ function binaryIndexBy(array, value, iteratee, retHighest) { valIsUndef = value === undefined; while (low < high) { - var mid = floor((low + high) / 2), + var mid = nativeFloor((low + high) / 2), computed = iteratee(array[mid]), isDef = computed !== undefined, isReflexive = computed === computed; diff --git a/lodash._binaryindexby/package.json b/lodash._binaryindexby/package.json index 6168fc519..d74f6c311 100644 --- a/lodash._binaryindexby/package.json +++ b/lodash._binaryindexby/package.json @@ -1,6 +1,6 @@ { "name": "lodash._binaryindexby", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s internal `binaryIndexBy` 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 0db45a3a6..14cc6ef12 100644 --- a/lodash._createwrapper/README.md +++ b/lodash._createwrapper/README.md @@ -1,4 +1,4 @@ -# lodash._createwrapper v3.0.2 +# lodash._createwrapper v3.0.3 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.2-npm-packages/lodash._createwrapper) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._createwrapper) for more details. diff --git a/lodash._createwrapper/index.js b/lodash._createwrapper/index.js index a4aad6448..6df03ad3a 100644 --- a/lodash._createwrapper/index.js +++ b/lodash._createwrapper/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -18,7 +18,7 @@ var BIND_FLAG = 1, CURRY_RIGHT_FLAG = 16, PARTIAL_FLAG = 32, PARTIAL_RIGHT_FLAG = 64, - ARY_FLAG = 256; + ARY_FLAG = 128; /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -28,9 +28,8 @@ var nativeMax = Math.max, nativeMin = Math.min; /** - * 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; @@ -198,6 +197,7 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); } var result = createHybridWrapper(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity); + result.placeholder = placeholder; return result; } @@ -350,11 +350,9 @@ function reorder(array, indexes) { } /** - * 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 @@ -375,7 +373,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'); } module.exports = createWrapper; diff --git a/lodash._createwrapper/package.json b/lodash._createwrapper/package.json index 4efca37a9..515965838 100644 --- a/lodash._createwrapper/package.json +++ b/lodash._createwrapper/package.json @@ -1,6 +1,6 @@ { "name": "lodash._createwrapper", - "version": "3.0.2", + "version": "3.0.3", "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/README.md b/lodash._isiterateecall/README.md index 6f34b4284..9af973d04 100644 --- a/lodash._isiterateecall/README.md +++ b/lodash._isiterateecall/README.md @@ -1,4 +1,4 @@ -# lodash._isiterateecall v3.0.2 +# lodash._isiterateecall v3.0.3 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.2-npm-packages/lodash._isiterateecall) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._isiterateecall) for more details. diff --git a/lodash._isiterateecall/index.js b/lodash._isiterateecall/index.js index 465a59cbd..9d9ad794b 100644 --- a/lodash._isiterateecall/index.js +++ b/lodash._isiterateecall/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * lodash 3.0.3 (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 */ @@ -48,8 +48,11 @@ function isIterateeCall(value, index, object) { } else { prereq = type == 'string' && index in object; } - var other = object[index]; - return prereq && (value === value ? value === other : other !== other); + if (prereq) { + var other = object[index]; + return value === value ? value === other : other !== other; + } + return false; } /** diff --git a/lodash._isiterateecall/package.json b/lodash._isiterateecall/package.json index 790ff86ad..afd9f5dcf 100644 --- a/lodash._isiterateecall/package.json +++ b/lodash._isiterateecall/package.json @@ -1,6 +1,6 @@ { "name": "lodash._isiterateecall", - "version": "3.0.2", + "version": "3.0.3", "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 675e9d9e2..249078bda 100644 --- a/lodash._toiterable/README.md +++ b/lodash._toiterable/README.md @@ -1,4 +1,4 @@ -# lodash._toiterable v3.0.2 +# lodash._toiterable v3.0.3 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.2-npm-packages/lodash._toiterable) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._toiterable) for more details. diff --git a/lodash._toiterable/index.js b/lodash._toiterable/index.js index 6be6fa8fb..386c8f9cd 100644 --- a/lodash._toiterable/index.js +++ b/lodash._toiterable/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -32,7 +32,7 @@ function baseProperty(key) { * Gets the "length" property value of `object`. * * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * in Safari on iOS 8.1 ARM64. + * that affects Safari on at least iOS 8.1-8.3 ARM64. * * @private * @param {Object} object The object to query. @@ -40,6 +40,17 @@ function baseProperty(key) { */ var getLength = baseProperty('length'); +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + /** * Checks if `value` is a valid array-like length. * @@ -64,7 +75,7 @@ function toIterable(value) { if (value == null) { return []; } - if (!isLength(getLength(value))) { + if (!isArrayLike(value)) { return values(value); } return isObject(value) ? value : Object(value); diff --git a/lodash._toiterable/package.json b/lodash._toiterable/package.json index 16f4eaeec..ff8793f14 100644 --- a/lodash._toiterable/package.json +++ b/lodash._toiterable/package.json @@ -1,6 +1,6 @@ { "name": "lodash._toiterable", - "version": "3.0.2", + "version": "3.0.3", "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.clone/LICENSE.txt b/lodash.before/LICENSE similarity index 100% rename from lodash.clone/LICENSE.txt rename to lodash.before/LICENSE diff --git a/lodash.before/README.md b/lodash.before/README.md index 961230212..59781e289 100644 --- a/lodash.before/README.md +++ b/lodash.before/README.md @@ -1,4 +1,4 @@ -# lodash.before v3.0.2 +# lodash.before v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.before` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var before = require('lodash.before'); ``` -See the [documentation](https://lodash.com/docs#before) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.before) for more details. +See the [documentation](https://lodash.com/docs#before) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.before) for more details. diff --git a/lodash.before/index.js b/lodash.before/index.js index 7c45eb705..68333844a 100644 --- a/lodash.before/index.js +++ b/lodash.before/index.js @@ -1,18 +1,11 @@ -/** - * lodash 3.0.2 (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 as the `TypeError` message for "Functions" methods. */ /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it is called less than `n` times. Subsequent + * of the created function, while it's called less than `n` times. Subsequent * calls to the created function return the result of the last `func` invocation. * * @static @@ -42,7 +35,7 @@ function before(n, func) { result = func.apply(this, arguments); } if (n <= 1) { - func = null; + func = undefined; } return result; }; diff --git a/lodash.before/package.json b/lodash.before/package.json index fb84e8bcd..5a2cc8627 100644 --- a/lodash.before/package.json +++ b/lodash.before/package.json @@ -1,6 +1,6 @@ { "name": "lodash.before", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.before` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.indexof/LICENSE.txt b/lodash.clone/LICENSE similarity index 100% rename from lodash.indexof/LICENSE.txt rename to lodash.clone/LICENSE diff --git a/lodash.clone/README.md b/lodash.clone/README.md index d6d570788..915c28d8c 100644 --- a/lodash.clone/README.md +++ b/lodash.clone/README.md @@ -1,4 +1,4 @@ -# lodash.clone v3.0.2 +# lodash.clone v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.clone` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var clone = require('lodash.clone'); ``` -See the [documentation](https://lodash.com/docs#clone) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.clone) for more details. +See the [documentation](https://lodash.com/docs#clone) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.clone) for more details. diff --git a/lodash.clone/index.js b/lodash.clone/index.js index b1f19e731..b5485c409 100644 --- a/lodash.clone/index.js +++ b/lodash.clone/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -12,10 +12,10 @@ var baseClone = require('lodash._baseclone'), /** * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, - * otherwise they are assigned by reference. If `customizer` is provided it is + * otherwise they are assigned by reference. If `customizer` is provided it's * invoked to produce the cloned values. If `customizer` returns `undefined` * cloning is handled by the method instead. The `customizer` is bound to - * `thisArg` and invoked with two argument; (value [, index|key, object]). + * `thisArg` and invoked with up to three argument; (value [, index|key, object]). * * **Note:** This method is loosely based on the * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). @@ -71,7 +71,7 @@ function clone(value, isDeep, customizer, thisArg) { isDeep = false; } return typeof customizer == 'function' - ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1)) + ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 3)) : baseClone(value, isDeep); } diff --git a/lodash.clone/package.json b/lodash.clone/package.json index 83a9d47bc..d34a45c10 100644 --- a/lodash.clone/package.json +++ b/lodash.clone/package.json @@ -1,6 +1,6 @@ { "name": "lodash.clone", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.clone` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.debounce/LICENSE.txt b/lodash.debounce/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.debounce/LICENSE.txt +++ b/lodash.debounce/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.debounce/README.md b/lodash.debounce/README.md index 0b998466f..5bffb8e72 100644 --- a/lodash.debounce/README.md +++ b/lodash.debounce/README.md @@ -1,4 +1,4 @@ -# lodash.debounce v3.0.2 +# lodash.debounce v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.debounce` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var debounce = require('lodash.debounce'); ``` -See the [documentation](https://lodash.com/docs#debounce) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.debounce) for more details. +See the [documentation](https://lodash.com/docs#debounce) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.debounce) for more details. diff --git a/lodash.debounce/index.js b/lodash.debounce/index.js index 17e0b7370..f6e43bfcd 100644 --- a/lodash.debounce/index.js +++ b/lodash.debounce/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -210,11 +210,9 @@ function debounce(func, wait, options) { } /** - * 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 @@ -235,7 +233,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'); } module.exports = debounce; diff --git a/lodash.debounce/package.json b/lodash.debounce/package.json index 83ec8e86e..03d4eb12a 100644 --- a/lodash.debounce/package.json +++ b/lodash.debounce/package.json @@ -1,6 +1,6 @@ { "name": "lodash.debounce", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.debounce` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.foreach/README.md b/lodash.foreach/README.md index 0748fd105..7d052d843 100644 --- a/lodash.foreach/README.md +++ b/lodash.foreach/README.md @@ -1,4 +1,4 @@ -# lodash.foreach v3.0.2 +# lodash.foreach v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.forEach` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var forEach = require('lodash.foreach'); ``` -See the [documentation](https://lodash.com/docs#forEach) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.foreach) for more details. +See the [documentation](https://lodash.com/docs#forEach) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.foreach) for more details. diff --git a/lodash.foreach/index.js b/lodash.foreach/index.js index bbf18fdda..de1b322fd 100644 --- a/lodash.foreach/index.js +++ b/lodash.foreach/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -21,7 +21,7 @@ var arrayEach = require('lodash._arrayeach'), */ function createForEach(arrayFunc, eachFunc) { return function(collection, iteratee, thisArg) { - return (typeof iteratee == 'function' && typeof thisArg == 'undefined' && isArray(collection)) + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) ? arrayFunc(collection, iteratee) : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); }; @@ -30,10 +30,10 @@ function createForEach(arrayFunc, eachFunc) { /** * Iterates over elements of `collection` invoking `iteratee` for each element. * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). Iterator functions may exit iteration early + * (value, index|key, collection). Iteratee functions may exit iteration early * by explicitly returning `false`. * - * **Note:** As with other "Collections" methods, objects with a `length` property + * **Note:** As with other "Collections" methods, objects with a "length" property * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` * may be used for object iteration. * diff --git a/lodash.foreach/package.json b/lodash.foreach/package.json index c49b4c0fe..3d339d067 100644 --- a/lodash.foreach/package.json +++ b/lodash.foreach/package.json @@ -1,6 +1,6 @@ { "name": "lodash.foreach", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.forEach` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isregexp/LICENSE.txt b/lodash.indexof/LICENSE similarity index 100% rename from lodash.isregexp/LICENSE.txt rename to lodash.indexof/LICENSE diff --git a/lodash.indexof/README.md b/lodash.indexof/README.md index 913c84eee..9bbe1f868 100644 --- a/lodash.indexof/README.md +++ b/lodash.indexof/README.md @@ -1,4 +1,4 @@ -# lodash.indexof v3.0.2 +# lodash.indexof v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.indexOf` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var indexOf = require('lodash.indexof'); ``` -See the [documentation](https://lodash.com/docs#indexOf) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.indexof) for more details. +See the [documentation](https://lodash.com/docs#indexOf) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.indexof) for more details. diff --git a/lodash.indexof/index.js b/lodash.indexof/index.js index 116a21435..354fd9f54 100644 --- a/lodash.indexof/index.js +++ b/lodash.indexof/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -14,8 +14,8 @@ var nativeMax = Math.max; /** * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` * performs a faster binary search. * @@ -48,10 +48,9 @@ function indexOf(array, value, fromIndex) { if (typeof fromIndex == 'number') { fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; } else if (fromIndex) { - var index = binaryIndex(array, value), - other = array[index]; - - if (value === value ? (value === other) : (other !== other)) { + var index = binaryIndex(array, value); + if (index < length && + (value === value ? (value === array[index]) : (array[index] !== array[index]))) { return index; } return -1; diff --git a/lodash.indexof/package.json b/lodash.indexof/package.json index 68579eb1e..2c2a32d86 100644 --- a/lodash.indexof/package.json +++ b/lodash.indexof/package.json @@ -1,6 +1,6 @@ { "name": "lodash.indexof", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.indexOf` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.intersection/LICENSE.txt b/lodash.intersection/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.intersection/LICENSE.txt +++ b/lodash.intersection/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.intersection/README.md b/lodash.intersection/README.md index 148396af6..99ac6c357 100644 --- a/lodash.intersection/README.md +++ b/lodash.intersection/README.md @@ -1,4 +1,4 @@ -# lodash.intersection v3.0.2 +# lodash.intersection v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.intersection` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var intersection = require('lodash.intersection'); ``` -See the [documentation](https://lodash.com/docs#intersection) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.intersection) for more details. +See the [documentation](https://lodash.com/docs#intersection) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.intersection) for more details. diff --git a/lodash.intersection/index.js b/lodash.intersection/index.js index 52edcff68..ee2ae5e33 100644 --- a/lodash.intersection/index.js +++ b/lodash.intersection/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -35,7 +35,8 @@ function intersection() { argsLength = arguments.length, caches = [], indexOf = baseIndexOf, - isCommon = true; + isCommon = true, + result = []; while (++argsIndex < argsLength) { var value = arguments[argsIndex]; @@ -45,10 +46,12 @@ function intersection() { } } argsLength = args.length; + if (argsLength < 2) { + return result; + } var array = args[0], index = -1, length = array ? array.length : 0, - result = [], seen = caches[0]; outer: diff --git a/lodash.intersection/package.json b/lodash.intersection/package.json index 4cf329fd5..6065a427e 100644 --- a/lodash.intersection/package.json +++ b/lodash.intersection/package.json @@ -1,6 +1,6 @@ { "name": "lodash.intersection", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.intersection` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isarguments/README.md b/lodash.isarguments/README.md index 8fa46e499..13d8159b3 100644 --- a/lodash.isarguments/README.md +++ b/lodash.isarguments/README.md @@ -1,4 +1,4 @@ -# lodash.isarguments v3.0.2 +# lodash.isarguments v3.0.3 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.2-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.3-npm-packages/lodash.isarguments) for more details. diff --git a/lodash.isarguments/index.js b/lodash.isarguments/index.js index a2bbf95a2..ede9f06e9 100644 --- a/lodash.isarguments/index.js +++ b/lodash.isarguments/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -34,7 +34,7 @@ var objToString = objectProto.toString; * 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; +var MAX_SAFE_INTEGER = 9007199254740991; /** * The base implementation of `_.property` without support for deep paths. diff --git a/lodash.isarguments/package.json b/lodash.isarguments/package.json index 0d4a480ce..c7b748a87 100644 --- a/lodash.isarguments/package.json +++ b/lodash.isarguments/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isarguments", - "version": "3.0.2", + "version": "3.0.3", "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/README.md b/lodash.isarray/README.md index 1b2c93709..10dbf2dbe 100644 --- a/lodash.isarray/README.md +++ b/lodash.isarray/README.md @@ -1,4 +1,4 @@ -# lodash.isarray v3.0.2 +# lodash.isarray v3.0.3 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.2-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.3-npm-packages/lodash.isarray) for more details. diff --git a/lodash.isarray/index.js b/lodash.isarray/index.js index 842c0f6df..9ab745890 100644 --- a/lodash.isarray/index.js +++ b/lodash.isarray/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -23,7 +23,7 @@ var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g, var reIsHostCtor = /^\[object .+?Constructor\]$/; /** - * 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 @@ -54,6 +54,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. @@ -62,18 +65,31 @@ 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 for those with the same name as other `lodash` methods. */ -var nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray; +var nativeIsArray = getNative(Array, 'isArray'); /** * 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; +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * 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 a valid array-like length. diff --git a/lodash.isarray/package.json b/lodash.isarray/package.json index ebde5eafc..5c6740300 100644 --- a/lodash.isarray/package.json +++ b/lodash.isarray/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isarray", - "version": "3.0.2", + "version": "3.0.3", "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.isboolean/README.md b/lodash.isboolean/README.md index 3490dffb7..b3c476b02 100644 --- a/lodash.isboolean/README.md +++ b/lodash.isboolean/README.md @@ -1,4 +1,4 @@ -# lodash.isboolean v3.0.2 +# lodash.isboolean v3.0.3 The [lodash](https://lodash.com/) method `_.isBoolean` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isBoolean = require('lodash.isboolean'); ``` -See the [documentation](https://lodash.com/docs#isBoolean) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.isboolean) for more details. +See the [documentation](https://lodash.com/docs#isBoolean) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isboolean) for more details. diff --git a/lodash.isboolean/index.js b/lodash.isboolean/index.js index 7416aab69..185921bf2 100644 --- a/lodash.isboolean/index.js +++ b/lodash.isboolean/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -11,10 +11,11 @@ var boolTag = '[object Boolean]'; /** 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) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -24,9 +25,10 @@ var objectToString = objectProto.toString; * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * * _.isBoolean(false); @@ -46,6 +48,7 @@ function isBoolean(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. diff --git a/lodash.isboolean/package.json b/lodash.isboolean/package.json index 013f1a740..01d6e8b91 100644 --- a/lodash.isboolean/package.json +++ b/lodash.isboolean/package.json @@ -1,11 +1,11 @@ { "name": "lodash.isboolean", - "version": "3.0.2", + "version": "3.0.3", "description": "The lodash method `_.isBoolean` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, isboolean", + "keywords": "lodash-modularized, isboolean", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.isdate/README.md b/lodash.isdate/README.md index 783b91aeb..ebbbd4ef0 100644 --- a/lodash.isdate/README.md +++ b/lodash.isdate/README.md @@ -1,4 +1,4 @@ -# lodash.isdate v3.0.2 +# lodash.isdate v3.0.3 The [lodash](https://lodash.com/) method `_.isDate` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isDate = require('lodash.isdate'); ``` -See the [documentation](https://lodash.com/docs#isDate) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.isdate) for more details. +See the [documentation](https://lodash.com/docs#isDate) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isdate) for more details. diff --git a/lodash.isdate/index.js b/lodash.isdate/index.js index 5246f9925..6e21586d3 100644 --- a/lodash.isdate/index.js +++ b/lodash.isdate/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -11,10 +11,11 @@ var dateTag = '[object Date]'; /** 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) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -24,9 +25,11 @@ var objectToString = objectProto.toString; * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isDate(new Date); @@ -45,6 +48,7 @@ function isDate(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. diff --git a/lodash.isdate/package.json b/lodash.isdate/package.json index 04544c73c..8f57680ac 100644 --- a/lodash.isdate/package.json +++ b/lodash.isdate/package.json @@ -1,11 +1,11 @@ { "name": "lodash.isdate", - "version": "3.0.2", + "version": "3.0.3", "description": "The lodash method `_.isDate` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, isdate", + "keywords": "lodash-modularized, isdate", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.iselement/LICENSE.txt b/lodash.iselement/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.iselement/LICENSE.txt +++ b/lodash.iselement/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.iselement/README.md b/lodash.iselement/README.md index 251acd37b..bff806ed2 100644 --- a/lodash.iselement/README.md +++ b/lodash.iselement/README.md @@ -1,4 +1,4 @@ -# lodash.iselement v3.0.2 +# lodash.iselement v3.0.3 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.2-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.3-npm-packages/lodash.iselement) for more details. diff --git a/lodash.iselement/index.js b/lodash.iselement/index.js index a2b13569e..134a6e73e 100644 --- a/lodash.iselement/index.js +++ b/lodash.iselement/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * lodash 3.0.3 (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 */ @@ -71,7 +71,7 @@ try { */ function isElement(value) { return (value && value.nodeType === 1 && isObjectLike(value) && - objToString.call(value).indexOf('Element') > -1) || false; + (objToString.call(value).indexOf('Element') > -1)) || false; } // Fallback for environments without DOM support. if (!support.dom) { diff --git a/lodash.iselement/package.json b/lodash.iselement/package.json index 9ff49514c..d17f425b4 100644 --- a/lodash.iselement/package.json +++ b/lodash.iselement/package.json @@ -1,6 +1,6 @@ { "name": "lodash.iselement", - "version": "3.0.2", + "version": "3.0.3", "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 aeff859e3..687c24d92 100644 --- a/lodash.isempty/README.md +++ b/lodash.isempty/README.md @@ -1,4 +1,4 @@ -# lodash.isempty v3.0.2 +# lodash.isempty v3.0.3 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.2-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.3-npm-packages/lodash.isempty) for more details. diff --git a/lodash.isempty/index.js b/lodash.isempty/index.js index e1bba520a..b7992ce26 100644 --- a/lodash.isempty/index.js +++ b/lodash.isempty/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -46,7 +46,7 @@ function baseProperty(key) { * Gets the "length" property value of `object`. * * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * in Safari on iOS 8.1 ARM64. + * that affects Safari on at least iOS 8.1-8.3 ARM64. * * @private * @param {Object} object The object to query. @@ -54,6 +54,17 @@ function baseProperty(key) { */ var getLength = baseProperty('length'); +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + /** * Checks if `value` is a valid array-like length. * @@ -98,10 +109,9 @@ function isEmpty(value) { if (value == null) { return true; } - var length = getLength(value); - if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) || + if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || (isObjectLike(value) && isFunction(value.splice)))) { - return !length; + return !value.length; } return !keys(value).length; } diff --git a/lodash.isempty/package.json b/lodash.isempty/package.json index 17f592c45..9ce7924b3 100644 --- a/lodash.isempty/package.json +++ b/lodash.isempty/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isempty", - "version": "3.0.2", + "version": "3.0.3", "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 3932e5e4a..b5c40b4ca 100644 --- a/lodash.isequal/README.md +++ b/lodash.isequal/README.md @@ -1,4 +1,4 @@ -# lodash.isequal v3.0.2 +# lodash.isequal v3.0.3 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.2-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.3-npm-packages/lodash.isequal) for more details. diff --git a/lodash.isequal/index.js b/lodash.isequal/index.js index d86ba02a5..221e37f18 100644 --- a/lodash.isequal/index.js +++ b/lodash.isequal/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -18,7 +18,7 @@ var baseIsEqual = require('lodash._baseisequal'), * equality comparisons, else `false`. */ function isStrictComparable(value) { - return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value)); + return value === value && !isObject(value); } /** diff --git a/lodash.isequal/package.json b/lodash.isequal/package.json index 20fc158fa..797b6bdb8 100644 --- a/lodash.isequal/package.json +++ b/lodash.isequal/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isequal", - "version": "3.0.2", + "version": "3.0.3", "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.iserror/README.md b/lodash.iserror/README.md index 3f560eaae..ee05575d6 100644 --- a/lodash.iserror/README.md +++ b/lodash.iserror/README.md @@ -1,4 +1,4 @@ -# lodash.iserror v3.0.2 +# lodash.iserror v3.0.3 The [lodash](https://lodash.com/) method `_.isError` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isError = require('lodash.iserror'); ``` -See the [documentation](https://lodash.com/docs#isError) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.iserror) for more details. +See the [documentation](https://lodash.com/docs#isError) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.iserror) for more details. diff --git a/lodash.iserror/index.js b/lodash.iserror/index.js index 9ca77efdd..85f1bbc2f 100644 --- a/lodash.iserror/index.js +++ b/lodash.iserror/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -11,7 +11,7 @@ var errorTag = '[object Error]'; /** 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.iserror/package.json b/lodash.iserror/package.json index 2d3c62fa7..1731ac724 100644 --- a/lodash.iserror/package.json +++ b/lodash.iserror/package.json @@ -1,11 +1,11 @@ { "name": "lodash.iserror", - "version": "3.0.2", + "version": "3.0.3", "description": "The lodash method `_.isError` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, iserror", + "keywords": "lodash-modularized, iserror", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.isfunction/README.md b/lodash.isfunction/README.md index 7b5b75561..7349c8d68 100644 --- a/lodash.isfunction/README.md +++ b/lodash.isfunction/README.md @@ -1,4 +1,4 @@ -# lodash.isfunction v3.0.2 +# lodash.isfunction v3.0.3 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.2-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.3-npm-packages/lodash.isfunction) for more details. diff --git a/lodash.isfunction/index.js b/lodash.isfunction/index.js index ea4225ce9..cb1fb402d 100644 --- a/lodash.isfunction/index.js +++ b/lodash.isfunction/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -10,9 +10,6 @@ /** `Object#toString` result references. */ var funcTag = '[object Function]'; -/** Used to detect host constructors (Safari > 5). */ -var reHostCtor = /^\[object .+?Constructor\]$/; - /** * 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 @@ -21,6 +18,9 @@ var reHostCtor = /^\[object .+?Constructor\]$/; var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g, reHasRegExpChars = RegExp(reRegExpChars.source); +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** * The base implementation of `_.isFunction` without support for environments * with incorrect `typeof` results. @@ -74,7 +74,7 @@ var fnToString = Function.prototype.toString; var objToString = objectProto.toString; /** Used to detect if a method is native. */ -var reNative = RegExp('^' + +var reIsNative = RegExp('^' + escapeRegExp(objToString) .replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); @@ -126,9 +126,9 @@ function isNative(value) { return false; } if (objToString.call(value) == funcTag) { - return reNative.test(fnToString.call(value)); + return reIsNative.test(fnToString.call(value)); } - return isObjectLike(value) && reHostCtor.test(value); + return isObjectLike(value) && reIsHostCtor.test(value); } /** diff --git a/lodash.isfunction/package.json b/lodash.isfunction/package.json index 0d23299ae..39c3f8f66 100644 --- a/lodash.isfunction/package.json +++ b/lodash.isfunction/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isfunction", - "version": "3.0.2", + "version": "3.0.3", "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/README.md b/lodash.isnative/README.md index 5213f402b..dc835b335 100644 --- a/lodash.isnative/README.md +++ b/lodash.isnative/README.md @@ -1,4 +1,4 @@ -# lodash.isnative v3.0.2 +# lodash.isnative v3.0.3 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.2-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.3-npm-packages/lodash.isnative) for more details. diff --git a/lodash.isnative/index.js b/lodash.isnative/index.js index 92e2c48a9..b41d43d81 100644 --- a/lodash.isnative/index.js +++ b/lodash.isnative/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -22,7 +22,7 @@ var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g, var reIsHostCtor = /^\[object .+?Constructor\]$/; /** - * 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 @@ -53,6 +53,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. @@ -61,8 +64,8 @@ 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.*?') + '$' ); /** diff --git a/lodash.isnative/package.json b/lodash.isnative/package.json index 753403652..75e81a06f 100644 --- a/lodash.isnative/package.json +++ b/lodash.isnative/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isnative", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.isNative` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isnumber/README.md b/lodash.isnumber/README.md index 593c8d37e..a1d434dd6 100644 --- a/lodash.isnumber/README.md +++ b/lodash.isnumber/README.md @@ -1,4 +1,4 @@ -# lodash.isnumber v3.0.2 +# lodash.isnumber v3.0.3 The [lodash](https://lodash.com/) method `_.isNumber` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isNumber = require('lodash.isnumber'); ``` -See the [documentation](https://lodash.com/docs#isNumber) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.isnumber) for more details. +See the [documentation](https://lodash.com/docs#isNumber) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isnumber) for more details. diff --git a/lodash.isnumber/index.js b/lodash.isnumber/index.js index 4d20c6ebf..3a6f7afbd 100644 --- a/lodash.isnumber/index.js +++ b/lodash.isnumber/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -11,10 +11,11 @@ var numberTag = '[object Number]'; /** 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) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -25,6 +26,7 @@ var objectToString = objectProto.toString; * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -49,14 +51,15 @@ function isObjectLike(value) { /** * Checks if `value` is classified as a `Number` primitive or object. * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified - * as numbers, use the `_.isFinite` method. + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); diff --git a/lodash.isnumber/package.json b/lodash.isnumber/package.json index 4fcdacc4e..4c33c2a31 100644 --- a/lodash.isnumber/package.json +++ b/lodash.isnumber/package.json @@ -1,11 +1,11 @@ { "name": "lodash.isnumber", - "version": "3.0.2", + "version": "3.0.3", "description": "The lodash method `_.isNumber` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, isnumber", + "keywords": "lodash-modularized, isnumber", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.istypedarray/LICENSE.txt b/lodash.isregexp/LICENSE similarity index 100% rename from lodash.istypedarray/LICENSE.txt rename to lodash.isregexp/LICENSE diff --git a/lodash.isregexp/README.md b/lodash.isregexp/README.md index c01946a2b..1439eb58d 100644 --- a/lodash.isregexp/README.md +++ b/lodash.isregexp/README.md @@ -1,4 +1,4 @@ -# lodash.isregexp v3.0.2 +# lodash.isregexp v3.0.3 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. @@ -17,4 +17,4 @@ In Node.js/io.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.2-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.3-npm-packages/lodash.isregexp) for more details. diff --git a/lodash.isregexp/index.js b/lodash.isregexp/index.js index d1268ee63..84812c9d1 100644 --- a/lodash.isregexp/index.js +++ b/lodash.isregexp/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -10,26 +10,42 @@ /** `Object#toString` result references. */ var regexpTag = '[object RegExp]'; -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - /** 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) + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objToString = objectProto.toString; +/** + * 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 classified as a `RegExp` object. * @@ -47,7 +63,7 @@ var objToString = objectProto.toString; * // => false */ function isRegExp(value) { - return isObjectLike(value) && objToString.call(value) == regexpTag; + return isObject(value) && objToString.call(value) == regexpTag; } module.exports = isRegExp; diff --git a/lodash.isregexp/package.json b/lodash.isregexp/package.json index cfd235444..4e595be47 100644 --- a/lodash.isregexp/package.json +++ b/lodash.isregexp/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isregexp", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.isRegExp` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._basedifference/LICENSE.txt b/lodash.istypedarray/LICENSE similarity index 89% rename from lodash._basedifference/LICENSE.txt rename to lodash.istypedarray/LICENSE index 17764328c..b054ca5a3 100644 --- a/lodash._basedifference/LICENSE.txt +++ b/lodash.istypedarray/LICENSE @@ -1,5 +1,5 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, 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.istypedarray/README.md b/lodash.istypedarray/README.md index b1779ccf7..c04b2208d 100644 --- a/lodash.istypedarray/README.md +++ b/lodash.istypedarray/README.md @@ -1,20 +1,18 @@ -# lodash.istypedarray v3.0.2 +# lodash.istypedarray v3.0.3 -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isTypedArray` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. +The [lodash](https://lodash.com/) method `_.isTypedArray` exported as a [Node.js](https://nodejs.org/) module. ## Installation Using npm: - ```bash $ {sudo -H} npm i -g npm $ npm i --save lodash.istypedarray ``` -In Node.js/io.js: - +In Node.js: ```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.2-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.3-npm-packages/lodash.istypedarray) for more details. diff --git a/lodash.istypedarray/index.js b/lodash.istypedarray/index.js index 006e17d93..037fd1422 100644 --- a/lodash.istypedarray/index.js +++ b/lodash.istypedarray/index.js @@ -1,4 +1,14 @@ -/** `Object#toString` result references. */ +/** + * 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 + */ + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', @@ -41,45 +51,70 @@ typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** 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; - -/** - * 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; +var objectToString = objectProto.toString; /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * - * @private + * @static + * @memberOf _ + * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + /** * Checks if `value` is classified as a typed array. * @@ -97,7 +132,7 @@ function isLength(value) { * // => false */ function isTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; } module.exports = isTypedArray; diff --git a/lodash.istypedarray/package.json b/lodash.istypedarray/package.json index 45484ce22..e8e4c62b6 100644 --- a/lodash.istypedarray/package.json +++ b/lodash.istypedarray/package.json @@ -1,17 +1,15 @@ { "name": "lodash.istypedarray", - "version": "3.0.2", - "description": "The modern build of lodash’s `_.isTypedArray` as a module.", + "version": "3.0.3", + "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", + "keywords": "lodash, lodash-modularized, stdlib, util, istypedarray", "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.keys/README.md b/lodash.keys/README.md index 2bdf5e614..6713a6f69 100644 --- a/lodash.keys/README.md +++ b/lodash.keys/README.md @@ -1,4 +1,4 @@ -# lodash.keys v3.0.2 +# lodash.keys v3.0.3 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.2-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.3-npm-packages/lodash.keys) for more details. diff --git a/lodash.keys/index.js b/lodash.keys/index.js index 444fa5977..a1c302d00 100644 --- a/lodash.keys/index.js +++ b/lodash.keys/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * lodash 3.0.3 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.7.0 @@ -219,7 +219,7 @@ function keysIn(object) { var Ctor = object.constructor, index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype == object, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, result = Array(length), skipIndexes = length > 0; diff --git a/lodash.keys/package.json b/lodash.keys/package.json index e245109ea..b3b597dd7 100644 --- a/lodash.keys/package.json +++ b/lodash.keys/package.json @@ -1,6 +1,6 @@ { "name": "lodash.keys", - "version": "3.0.2", + "version": "3.0.3", "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/README.md b/lodash.keysin/README.md index c6e55a0f8..6db633e76 100644 --- a/lodash.keysin/README.md +++ b/lodash.keysin/README.md @@ -1,4 +1,4 @@ -# lodash.keysin v3.0.2 +# lodash.keysin v3.0.3 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.2-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.3-npm-packages/lodash.keysin) for more details. diff --git a/lodash.keysin/index.js b/lodash.keysin/index.js index 138893122..a018d0441 100644 --- a/lodash.keysin/index.js +++ b/lodash.keysin/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * lodash 3.0.3 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.7.0 @@ -148,7 +148,7 @@ function keysIn(object) { var Ctor = object.constructor, index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype == object, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, result = Array(length), skipIndexes = length > 0; diff --git a/lodash.keysin/package.json b/lodash.keysin/package.json index dd453b24c..5cccd32ee 100644 --- a/lodash.keysin/package.json +++ b/lodash.keysin/package.json @@ -1,6 +1,6 @@ { "name": "lodash.keysin", - "version": "3.0.2", + "version": "3.0.3", "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/README.md b/lodash.memoize/README.md index a153c61a7..c16691780 100644 --- a/lodash.memoize/README.md +++ b/lodash.memoize/README.md @@ -1,4 +1,4 @@ -# lodash.memoize v3.0.2 +# lodash.memoize v3.0.3 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.2-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.3-npm-packages/lodash.memoize) for more details. diff --git a/lodash.memoize/index.js b/lodash.memoize/index.js index fa3112917..e62d69ff6 100644 --- a/lodash.memoize/index.js +++ b/lodash.memoize/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * lodash 3.0.3 (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 */ @@ -68,7 +68,7 @@ function mapHas(key) { } /** - * Adds `value` to `key` of the cache. + * Sets `value` to `key` of the cache. * * @private * @name set @@ -94,10 +94,8 @@ 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 ES `Map` method interface - * of `get`, `has`, and `set`. See the - * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object) - * for more details. + * constructor with one whose instances implement the [`Map`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object) + * method interface of `get`, `has`, and `set`. * * @static * @memberOf _ @@ -142,13 +140,14 @@ function memoize(func, resolver) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { - var cache = memoized.cache, - key = resolver ? resolver.apply(this, arguments) : arguments[0]; + var args = arguments, + cache = memoized.cache, + key = resolver ? resolver.apply(this, args) : args[0]; if (cache.has(key)) { return cache.get(key); } - var result = func.apply(this, arguments); + var result = func.apply(this, args); cache.set(key, result); return result; }; diff --git a/lodash.memoize/package.json b/lodash.memoize/package.json index 4e71cb698..70f15b038 100644 --- a/lodash.memoize/package.json +++ b/lodash.memoize/package.json @@ -1,6 +1,6 @@ { "name": "lodash.memoize", - "version": "3.0.2", + "version": "3.0.3", "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.merge/LICENSE.txt b/lodash.merge/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.merge/LICENSE.txt +++ b/lodash.merge/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.merge/README.md b/lodash.merge/README.md index 27d4c58f9..80167daba 100644 --- a/lodash.merge/README.md +++ b/lodash.merge/README.md @@ -1,4 +1,4 @@ -# lodash.merge v3.0.2 +# lodash.merge v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.merge` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var merge = require('lodash.merge'); ``` -See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.merge) for more details. +See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.merge) for more details. diff --git a/lodash.merge/index.js b/lodash.merge/index.js index 0a09d8995..dfa16254a 100644 --- a/lodash.merge/index.js +++ b/lodash.merge/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * lodash 3.0.3 (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 */ @@ -79,7 +79,7 @@ function baseMerge(object, source, customizer, stackA, stackB) { result = srcValue; } if ((isSrcArr || typeof result != 'undefined') && - (isCommon || (result === result ? result !== value : value === value))) { + (isCommon || (result === result ? (result !== value) : (value === value)))) { object[key] = result; } }); @@ -139,7 +139,7 @@ function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stack if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); - } else if (result === result ? result !== value : value === value) { + } else if (result === result ? (result !== value) : (value === value)) { object[key] = result; } } diff --git a/lodash.merge/package.json b/lodash.merge/package.json index aecacc0d3..f2ebee957 100644 --- a/lodash.merge/package.json +++ b/lodash.merge/package.json @@ -1,6 +1,6 @@ { "name": "lodash.merge", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.merge` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.mixin/README.md b/lodash.mixin/README.md index d404f7594..805556db7 100644 --- a/lodash.mixin/README.md +++ b/lodash.mixin/README.md @@ -1,4 +1,4 @@ -# lodash.mixin v3.0.2 +# lodash.mixin v3.0.3 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.2-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.3-npm-packages/lodash.mixin) for more details. diff --git a/lodash.mixin/index.js b/lodash.mixin/index.js index 8993637f7..df7fa8658 100644 --- a/lodash.mixin/index.js +++ b/lodash.mixin/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -41,7 +41,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'); } /** @@ -69,9 +69,6 @@ function isObject(value) { * }); * } * - * // use `_.runInContext` to avoid conflicts (esp. in Node.js) - * var _ = require('lodash').runInContext(); - * * _.mixin({ 'vowels': vowels }); * _.vowels('fred'); * // => ['e'] diff --git a/lodash.mixin/package.json b/lodash.mixin/package.json index f873bda7e..48a234fce 100644 --- a/lodash.mixin/package.json +++ b/lodash.mixin/package.json @@ -1,6 +1,6 @@ { "name": "lodash.mixin", - "version": "3.0.2", + "version": "3.0.3", "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/README.md b/lodash.support/README.md index eb9c46cfb..197b1b83b 100644 --- a/lodash.support/README.md +++ b/lodash.support/README.md @@ -1,4 +1,4 @@ -# lodash.support v3.0.2 +# lodash.support v3.0.3 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.2-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.3-npm-packages/lodash.support) for more details. diff --git a/lodash.support/index.js b/lodash.support/index.js index 5c4fcf964..01b4e5c37 100644 --- a/lodash.support/index.js +++ b/lodash.support/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -7,14 +7,8 @@ * Available under MIT license */ -/** Used for native method references. */ -var objectProto = Object.prototype; - /** Used to detect DOM support. */ -var document = (document = global.window) && document.document; - -/** Native method references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; +var document = (document = global.window) ? document.document : null; /** * An object environment feature flags. @@ -27,7 +21,6 @@ var support = {}; (function(x) { var Ctor = function() { this.x = x; }, - args = arguments, object = { '0': x, 'length': x }, props = []; @@ -45,24 +38,6 @@ var support = {}; } catch(e) { support.dom = false; } - - /** - * Detect if `arguments` object indexes are non-enumerable. - * - * In Firefox < 4, IE < 9, PhantomJS, and Safari < 5.1 `arguments` object - * indexes are non-enumerable. Chrome < 25 and Node.js < 0.11.0 treat - * `arguments` object indexes as non-enumerable and fail `hasOwnProperty` - * checks for indexes that exceed the number of function parameters and - * whose associated argument values are `0`. - * - * @memberOf _.support - * @type boolean - */ - try { - support.nonEnumArgs = !propertyIsEnumerable.call(args, 1); - } catch(e) { - support.nonEnumArgs = true; - } }(1, 0)); module.exports = support; diff --git a/lodash.support/package.json b/lodash.support/package.json index 825afb883..e0797432e 100644 --- a/lodash.support/package.json +++ b/lodash.support/package.json @@ -1,6 +1,6 @@ { "name": "lodash.support", - "version": "3.0.2", + "version": "3.0.3", "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/README.md b/lodash.throttle/README.md index 192b2a65e..49b6c9ca3 100644 --- a/lodash.throttle/README.md +++ b/lodash.throttle/README.md @@ -1,4 +1,4 @@ -# lodash.throttle v3.0.2 +# lodash.throttle v3.0.3 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.2-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.3-npm-packages/lodash.throttle) for more details. diff --git a/lodash.throttle/index.js b/lodash.throttle/index.js index 4bdf262ce..b3239e706 100644 --- a/lodash.throttle/index.js +++ b/lodash.throttle/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -19,12 +19,12 @@ var debounceOptions = { }; /** - * Creates a function that only invokes `func` at most once per every `wait` - * milliseconds. The created function comes with a `cancel` method to cancel - * delayed invocations. Provide an options object to indicate that `func` - * should be invoked on the leading and/or trailing edge of the `wait` timeout. - * Subsequent calls to the throttled function return the result of the last - * `func` call. + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed invocations. Provide an options object to indicate + * that `func` should be invoked on the leading and/or trailing edge of the + * `wait` timeout. Subsequent calls to the throttled function return the + * result of the last `func` call. * * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked * on the trailing edge of the timeout only if the the throttled function is @@ -100,7 +100,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 = throttle; diff --git a/lodash.throttle/package.json b/lodash.throttle/package.json index 33a016a4f..b3e8f5826 100644 --- a/lodash.throttle/package.json +++ b/lodash.throttle/package.json @@ -1,6 +1,6 @@ { "name": "lodash.throttle", - "version": "3.0.2", + "version": "3.0.3", "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.times/LICENSE.txt b/lodash.times/LICENSE similarity index 100% rename from lodash.times/LICENSE.txt rename to lodash.times/LICENSE diff --git a/lodash.times/README.md b/lodash.times/README.md index e2dff6178..6ccf40fcd 100644 --- a/lodash.times/README.md +++ b/lodash.times/README.md @@ -1,4 +1,4 @@ -# lodash.times v3.0.2 +# lodash.times v3.0.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.times` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var times = require('lodash.times'); ``` -See the [documentation](https://lodash.com/docs#times) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.times) for more details. +See the [documentation](https://lodash.com/docs#times) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.times) for more details. diff --git a/lodash.times/index.js b/lodash.times/index.js index 309d22393..ba0a50653 100644 --- a/lodash.times/index.js +++ b/lodash.times/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 @@ -8,11 +8,9 @@ */ var bindCallback = require('lodash._bindcallback'); -/** Native method references. */ -var floor = Math.floor; - /* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsFinite = global.isFinite, +var nativeFloor = Math.floor, + nativeIsFinite = global.isFinite, nativeMin = Math.min; /** Used as references for the maximum length and index of an array. */ @@ -46,7 +44,7 @@ var MAX_ARRAY_LENGTH = 4294967295; * // => also invokes `mage.castSpell(n)` three times */ function times(n, iteratee, thisArg) { - n = floor(n); + n = nativeFloor(n); // Exit early to avoid a JSC JIT bug in Safari 8 // where `Array(0)` is treated as `Array(1)`. diff --git a/lodash.times/package.json b/lodash.times/package.json index 8ae76d4b4..68e51838f 100644 --- a/lodash.times/package.json +++ b/lodash.times/package.json @@ -1,6 +1,6 @@ { "name": "lodash.times", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.times` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.transform/README.md b/lodash.transform/README.md index 19a9630fb..044852b34 100644 --- a/lodash.transform/README.md +++ b/lodash.transform/README.md @@ -1,4 +1,4 @@ -# lodash.transform v3.0.2 +# lodash.transform v3.0.3 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.2-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.3-npm-packages/lodash.transform) for more details. diff --git a/lodash.transform/index.js b/lodash.transform/index.js index 286662c2d..220fd418a 100644 --- a/lodash.transform/index.js +++ b/lodash.transform/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -52,7 +52,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'); } /** @@ -94,7 +94,7 @@ function transform(object, iteratee, accumulator, thisArg) { if (isArr) { accumulator = isArray(object) ? new Ctor : []; } else { - accumulator = baseCreate(isFunction(Ctor) && Ctor.prototype); + accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : null); } } else { accumulator = {}; diff --git a/lodash.transform/package.json b/lodash.transform/package.json index cdab04239..a321b865d 100644 --- a/lodash.transform/package.json +++ b/lodash.transform/package.json @@ -1,6 +1,6 @@ { "name": "lodash.transform", - "version": "3.0.2", + "version": "3.0.3", "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/LICENSE b/lodash.trimleft/LICENSE new file mode 100644 index 000000000..bcbe13d67 --- /dev/null +++ b/lodash.trimleft/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +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.trimleft/LICENSE.txt b/lodash.trimleft/LICENSE.txt deleted file mode 100644 index 17764328c..000000000 --- a/lodash.trimleft/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 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.trimleft/README.md b/lodash.trimleft/README.md index 937c73741..8832e0f4a 100644 --- a/lodash.trimleft/README.md +++ b/lodash.trimleft/README.md @@ -1,6 +1,10 @@ -# lodash.trimleft v3.0.2 +# lodash.trimleft v3.0.3 -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.trimLeft` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. +The [lodash](https://lodash.com/) method `_.trimLeft` exported as a [Node.js](https://nodejs.org/) module. + +## Discontinued + +This package has been discontinued in favor of [lodash.trimstart](https://www.npmjs.com/package/lodash.trimstart). ## Installation @@ -17,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.2-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.3-npm-packages/lodash.trimleft) for more details. diff --git a/lodash.trimleft/index.js b/lodash.trimleft/index.js index c7722fbde..249b19501 100644 --- a/lodash.trimleft/index.js +++ b/lodash.trimleft/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * lodash 3.0.3 (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 0dd1cab1d..e415f0358 100644 --- a/lodash.trimleft/package.json +++ b/lodash.trimleft/package.json @@ -1,6 +1,6 @@ { "name": "lodash.trimleft", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.trimLeft` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.trimright/LICENSE b/lodash.trimright/LICENSE new file mode 100644 index 000000000..bcbe13d67 --- /dev/null +++ b/lodash.trimright/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +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.trimright/LICENSE.txt b/lodash.trimright/LICENSE.txt deleted file mode 100644 index 17764328c..000000000 --- a/lodash.trimright/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 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.trimright/README.md b/lodash.trimright/README.md index 7e54a1278..b4aeb9441 100644 --- a/lodash.trimright/README.md +++ b/lodash.trimright/README.md @@ -1,6 +1,10 @@ -# lodash.trimright v3.0.2 +# lodash.trimright v3.0.3 -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.trimRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. +The [lodash](https://lodash.com/) method `_.trimRight` exported as a [Node.js](https://nodejs.org/) module. + +## Discontinued + +This package has been discontinued in favor of [lodash.trimend](https://www.npmjs.com/package/lodash.trimend). ## Installation @@ -17,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.2-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.3-npm-packages/lodash.trimright) for more details. diff --git a/lodash.trimright/index.js b/lodash.trimright/index.js index d7b033e3d..fe8e43cf5 100644 --- a/lodash.trimright/index.js +++ b/lodash.trimright/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.2 (Custom Build) + * lodash 3.0.3 (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 122c7cb00..338e14770 100644 --- a/lodash.trimright/package.json +++ b/lodash.trimright/package.json @@ -1,6 +1,6 @@ { "name": "lodash.trimright", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.trimRight` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.trunc/README.md b/lodash.trunc/README.md index 05bda9f80..5006ad328 100644 --- a/lodash.trunc/README.md +++ b/lodash.trunc/README.md @@ -1,4 +1,4 @@ -# lodash.trunc v3.0.2 +# lodash.trunc v3.0.3 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.2-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.3-npm-packages/lodash.trunc) for more details. diff --git a/lodash.trunc/index.js b/lodash.trunc/index.js index 7c4f04d13..cd63fc38b 100644 --- a/lodash.trunc/index.js +++ b/lodash.trunc/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.0.2 (Custom Build) + * 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 + * Based on Underscore.js 1.8.3 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -41,11 +41,11 @@ 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'); } /** - * Truncates `string` if it is longer than the given maximum string length. + * Truncates `string` if it's longer than the given maximum string length. * The last characters of the truncated string are replaced with the omission * string which defaults to "...". * diff --git a/lodash.trunc/package.json b/lodash.trunc/package.json index a61717b08..fb4a4af22 100644 --- a/lodash.trunc/package.json +++ b/lodash.trunc/package.json @@ -1,6 +1,6 @@ { "name": "lodash.trunc", - "version": "3.0.2", + "version": "3.0.3", "description": "The modern build of lodash’s `_.trunc` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg",