diff --git a/README.md b/README.md index 0156d25c1..1bdd81cd6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v3.1.0 +# lodash v3.1.1 The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. diff --git a/lodash._baseassign/README.md b/lodash._baseassign/README.md index 708412488..ac002bc03 100644 --- a/lodash._baseassign/README.md +++ b/lodash._baseassign/README.md @@ -1,4 +1,4 @@ -# lodash._baseassign v3.1.0 +# lodash._baseassign v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseAssign` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseAssign = require('lodash._baseassign'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseassign) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._baseassign) for more details. diff --git a/lodash._baseassign/index.js b/lodash._baseassign/index.js index d0e14f3ea..1e37f49e8 100644 --- a/lodash._baseassign/index.js +++ b/lodash._baseassign/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -11,24 +11,7 @@ var baseCopy = require('lodash._basecopy'), keys = require('lodash.keys'); /** Native method references. */ -var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols, - preventExtensions = isNative(Object.preventExtensions = Object.preventExtensions) && preventExtensions; - -/** Used as `baseAssign`. */ -var nativeAssign = (function() { - // Avoid `Object.assign` in Firefox 34-37 which have an early implementation - // with a now defunct try/catch behavior. See https://bugzilla.mozilla.org/show_bug.cgi?id=1103344 - // for more details. - // - // Use `Object.preventExtensions` on a plain object instead of simply using - // `Object('x')` because Chrome and IE fail to throw an error when attempting - // to assign values to readonly indexes of strings in strict mode. - var object = { '1': 0 }, - func = preventExtensions && isNative(func = Object.assign) && func; - - try { func(preventExtensions(object), 'xo'); } catch(e) {} - return !object[1] && func; -}()); +var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols; /** * The base implementation of `_.assign` without support for argument juggling, @@ -39,7 +22,7 @@ var nativeAssign = (function() { * @param {Object} source The source object. * @returns {Object} Returns `object`. */ -var baseAssign = nativeAssign || function(object, source) { +var baseAssign = function(object, source) { return source == null ? object : baseCopy(source, getSymbols(source), baseCopy(source, keys(source), object)); diff --git a/lodash._baseassign/package.json b/lodash._baseassign/package.json index e2e4d9686..8a8418ff0 100644 --- a/lodash._baseassign/package.json +++ b/lodash._baseassign/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseassign", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s internal `baseAssign` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._basecallback/README.md b/lodash._basecallback/README.md index 494c757ba..fb246c7dd 100644 --- a/lodash._basecallback/README.md +++ b/lodash._basecallback/README.md @@ -1,4 +1,4 @@ -# lodash._basecallback v3.1.0 +# lodash._basecallback v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseCallback` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseCallback = require('lodash._basecallback'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._basecallback) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._basecallback) for more details. diff --git a/lodash._basecallback/index.js b/lodash._basecallback/index.js index 59e124fef..09271901a 100644 --- a/lodash._basecallback/index.js +++ b/lodash._basecallback/index.js @@ -1,14 +1,20 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.7.0 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ -var baseMatches = require('lodash._basematches'), - baseProperty = require('lodash._baseproperty'), - bindCallback = require('lodash._bindcallback'); +var baseIsEqual = require('lodash._baseisequal'), + bindCallback = require('lodash._bindcallback'), + keys = require('lodash.keys'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.callback` which supports specifying the @@ -36,6 +42,144 @@ function baseCallback(func, thisArg, argCount) { : baseProperty(func + ''); } +/** + * The base implementation of `_.isMatch` without support for callback + * shorthands or `this` binding. + * + * @private + * @param {Object} source The object to inspect. + * @param {Array} props The source property names to match. + * @param {Array} values The source values to match. + * @param {Array} strictCompareFlags Strict comparison flags for source values. + * @param {Function} [customizer] The function to customize comparing objects. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, props, values, strictCompareFlags, customizer) { + var length = props.length; + if (object == null) { + return !length; + } + var index = -1, + noCustomizer = !customizer; + + while (++index < length) { + if ((noCustomizer && strictCompareFlags[index]) + ? values[index] !== object[props[index]] + : !hasOwnProperty.call(object, props[index]) + ) { + return false; + } + } + index = -1; + while (++index < length) { + var key = props[index]; + if (noCustomizer && strictCompareFlags[index]) { + var result = hasOwnProperty.call(object, key); + } else { + var objValue = object[key], + srcValue = values[index]; + + result = customizer ? customizer(objValue, srcValue, key) : undefined; + if (typeof result == 'undefined') { + result = baseIsEqual(srcValue, objValue, customizer, true); + } + } + if (!result) { + return false; + } + } + return true; +} + +/** + * The base implementation of `_.matches` which supports specifying whether + * `source` should be cloned. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ +function baseMatches(source) { + var props = keys(source), + length = props.length; + + if (length == 1) { + var key = props[0], + value = source[key]; + + if (isStrictComparable(value)) { + return function(object) { + return object != null && value === object[key] && hasOwnProperty.call(object, key); + }; + } + } + var values = Array(length), + strictCompareFlags = Array(length); + + while (length--) { + value = source[props[length]]; + values[length] = value; + strictCompareFlags[length] = isStrictComparable(value); + } + return function(object) { + return baseIsMatch(object, props, values, strictCompareFlags); + }; +} + +/** + * The base implementation of `_.property` which does not coerce `key` to a string. + * + * @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]; + }; +} + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value)); +} + +/** + * Checks if `value` is the language type 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 + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return type == 'function' || (value && type == 'object') || false; +} + /** * This method returns the first argument provided to it. * diff --git a/lodash._basecallback/package.json b/lodash._basecallback/package.json index 140bf0049..c9300c5ca 100644 --- a/lodash._basecallback/package.json +++ b/lodash._basecallback/package.json @@ -1,6 +1,6 @@ { "name": "lodash._basecallback", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s internal `baseCallback` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -16,8 +16,8 @@ "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._basematches": "^3.0.0", - "lodash._baseproperty": "^3.0.0", - "lodash._bindcallback": "^3.0.0" + "lodash._baseisequal": "^3.0.0", + "lodash._bindcallback": "^3.0.0", + "lodash.keys": "^3.0.0" } } diff --git a/lodash._baseflatten/LICENSE.txt b/lodash._baseflatten/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash._baseflatten/LICENSE.txt +++ b/lodash._baseflatten/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._baseflatten/README.md b/lodash._baseflatten/README.md index 1c1a44565..4da7b70df 100644 --- a/lodash._baseflatten/README.md +++ b/lodash._baseflatten/README.md @@ -1,4 +1,4 @@ -# lodash._baseflatten v3.1.0 +# lodash._baseflatten v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseFlatten` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseFlatten = require('lodash._baseflatten'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseflatten) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._baseflatten) for more details. diff --git a/lodash._baseflatten/index.js b/lodash._baseflatten/index.js index 1eeab6c50..9177b1ef6 100644 --- a/lodash._baseflatten/index.js +++ b/lodash._baseflatten/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.2 @@ -17,13 +17,12 @@ var isArguments = require('lodash.isarguments'), * @returns {boolean} Returns `true` if `value` is object-like, else `false`. */ function isObjectLike(value) { - return (value && typeof value == 'object') || false; + return !!value && typeof value == 'object'; } /** - * Used 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; @@ -35,11 +34,10 @@ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; * @param {Array} array The array to flatten. * @param {boolean} isDeep Specify a deep flatten. * @param {boolean} isStrict Restrict flattening to arrays and `arguments` objects. - * @param {number} fromIndex The index to start from. * @returns {Array} Returns the new flattened array. */ -function baseFlatten(array, isDeep, isStrict, fromIndex) { - var index = fromIndex - 1, +function baseFlatten(array, isDeep, isStrict) { + var index = -1, length = array.length, resIndex = -1, result = []; @@ -50,7 +48,7 @@ function baseFlatten(array, isDeep, isStrict, fromIndex) { if (isObjectLike(value) && isLength(value.length) && (isArray(value) || isArguments(value))) { if (isDeep) { // Recursively flatten arrays (susceptible to call stack limits). - value = baseFlatten(value, isDeep, isStrict, 0); + value = baseFlatten(value, isDeep, isStrict); } var valIndex = -1, valLength = value.length; @@ -69,9 +67,7 @@ function baseFlatten(array, isDeep, isStrict, fromIndex) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on ES `ToLength`. See the - * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) - * for more details. + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). * * @private * @param {*} value The value to check. diff --git a/lodash._baseflatten/package.json b/lodash._baseflatten/package.json index 0bced3237..74f03f55c 100644 --- a/lodash._baseflatten/package.json +++ b/lodash._baseflatten/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseflatten", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s internal `baseFlatten` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._baseismatch/LICENSE.txt b/lodash._baseismatch/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash._baseismatch/LICENSE.txt +++ b/lodash._baseismatch/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._baseismatch/README.md b/lodash._baseismatch/README.md index 5afefee20..54ac02f50 100644 --- a/lodash._baseismatch/README.md +++ b/lodash._baseismatch/README.md @@ -1,4 +1,4 @@ -# lodash._baseismatch v3.1.0 +# lodash._baseismatch v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseIsMatch` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseIsMatch = require('lodash._baseismatch'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._baseismatch) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._baseismatch) for more details. diff --git a/lodash._baseismatch/index.js b/lodash._baseismatch/index.js index 27ad9db11..131038a14 100644 --- a/lodash._baseismatch/index.js +++ b/lodash._baseismatch/index.js @@ -1,22 +1,16 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ var baseIsEqual = require('lodash._baseisequal'); -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - /** * The base implementation of `_.isMatch` without support for callback - * shorthands or `this` binding. + * shorthands and `this` binding. * * @private * @param {Object} object The object to inspect. @@ -27,30 +21,27 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, props, values, strictCompareFlags, customizer) { - var length = props.length; - if (object == null) { - return !length; - } var index = -1, + length = props.length, noCustomizer = !customizer; while (++index < length) { if ((noCustomizer && strictCompareFlags[index]) ? values[index] !== object[props[index]] - : !hasOwnProperty.call(object, props[index]) + : !(props[index] in object) ) { return false; } } index = -1; while (++index < length) { - var key = props[index]; - if (noCustomizer && strictCompareFlags[index]) { - var result = hasOwnProperty.call(object, key); - } else { - var objValue = object[key], - srcValue = values[index]; + var key = props[index], + objValue = object[key], + srcValue = values[index]; + if (noCustomizer && strictCompareFlags[index]) { + var result = typeof objValue != 'undefined' || (key in object); + } else { result = customizer ? customizer(objValue, srcValue, key) : undefined; if (typeof result == 'undefined') { result = baseIsEqual(srcValue, objValue, customizer, true); diff --git a/lodash._baseismatch/package.json b/lodash._baseismatch/package.json index 9eec87c04..b1f837a3b 100644 --- a/lodash._baseismatch/package.json +++ b/lodash._baseismatch/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseismatch", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s internal `baseIsMatch` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._basematches/README.md b/lodash._basematches/README.md index 6adb17217..84875efc7 100644 --- a/lodash._basematches/README.md +++ b/lodash._basematches/README.md @@ -1,4 +1,4 @@ -# lodash._basematches v3.1.0 +# lodash._basematches v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseMatches` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseMatches = require('lodash._basematches'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._basematches) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._basematches) for more details. diff --git a/lodash._basematches/index.js b/lodash._basematches/index.js index b2a2e8a5a..166f98a5c 100644 --- a/lodash._basematches/index.js +++ b/lodash._basematches/index.js @@ -1,12 +1,12 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.7.0 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ -var baseIsEqual = require('lodash._baseisequal'), +var baseIsMatch = require('lodash._baseismatch'), keys = require('lodash.keys'); /** Used for native method references. */ @@ -15,55 +15,6 @@ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; -/** - * The base implementation of `_.isMatch` without support for callback - * shorthands or `this` binding. - * - * @private - * @param {Object} source The object to inspect. - * @param {Array} props The source property names to match. - * @param {Array} values The source values to match. - * @param {Array} strictCompareFlags Strict comparison flags for source values. - * @param {Function} [customizer] The function to customize comparing objects. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, props, values, strictCompareFlags, customizer) { - var length = props.length; - if (object == null) { - return !length; - } - var index = -1, - noCustomizer = !customizer; - - while (++index < length) { - if ((noCustomizer && strictCompareFlags[index]) - ? values[index] !== object[props[index]] - : !hasOwnProperty.call(object, props[index]) - ) { - return false; - } - } - index = -1; - while (++index < length) { - var key = props[index]; - if (noCustomizer && strictCompareFlags[index]) { - var result = hasOwnProperty.call(object, key); - } else { - var objValue = object[key], - srcValue = values[index]; - - result = customizer ? customizer(objValue, srcValue, key) : undefined; - if (typeof result == 'undefined') { - result = baseIsEqual(srcValue, objValue, customizer, true); - } - } - if (!result) { - return false; - } - } - return true; -} - /** * The base implementation of `_.matches` which supports specifying whether * `source` should be cloned. diff --git a/lodash._basematches/package.json b/lodash._basematches/package.json index a02b69fe0..70b791f6d 100644 --- a/lodash._basematches/package.json +++ b/lodash._basematches/package.json @@ -1,6 +1,6 @@ { "name": "lodash._basematches", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s internal `baseMatches` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -16,7 +16,7 @@ "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseisequal": "^3.0.0", + "lodash._baseismatch": "^3.0.0", "lodash.keys": "^3.0.0" } } diff --git a/lodash._createassigner/README.md b/lodash._createassigner/README.md index c65eaf1e2..daeebcef9 100644 --- a/lodash._createassigner/README.md +++ b/lodash._createassigner/README.md @@ -1,4 +1,4 @@ -# lodash._createassigner v3.1.0 +# lodash._createassigner v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createAssigner` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var createAssigner = require('lodash._createassigner'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._createassigner) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._createassigner) for more details. diff --git a/lodash._createassigner/index.js b/lodash._createassigner/index.js index d21e708a0..93b818693 100644 --- a/lodash._createassigner/index.js +++ b/lodash._createassigner/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -11,10 +11,7 @@ var bindCallback = require('lodash._bindcallback'), restParam = require('lodash.restparam'); /** - * Creates a function that assigns properties of source object(s) to a given - * destination object. - * - * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`. + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. * * @private * @param {Function} assigner The function to assign values. @@ -24,19 +21,19 @@ function createAssigner(assigner) { return restParam(function(object, sources) { var index = -1, length = object == null ? 0 : sources.length, - customizer = length > 2 && sources[length - 2], - guard = length > 2 && sources[2], - thisArg = length > 1 && sources[length - 1]; + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; if (typeof customizer == 'function') { customizer = bindCallback(customizer, thisArg, 5); length -= 2; } else { - customizer = typeof thisArg == 'function' ? thisArg : null; + customizer = typeof thisArg == 'function' ? thisArg : undefined; length -= (customizer ? 1 : 0); } if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? null : customizer; + customizer = length < 3 ? undefined : customizer; length = 1; } while (++index < length) { diff --git a/lodash._createassigner/package.json b/lodash._createassigner/package.json index cca0ff052..e7baed32a 100644 --- a/lodash._createassigner/package.json +++ b/lodash._createassigner/package.json @@ -1,6 +1,6 @@ { "name": "lodash._createassigner", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s internal `createAssigner` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._createcache/README.md b/lodash._createcache/README.md index 8ce5dae08..4c13df646 100644 --- a/lodash._createcache/README.md +++ b/lodash._createcache/README.md @@ -1,4 +1,4 @@ -# lodash._createcache v3.1.0 +# lodash._createcache v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `createCache` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var createCache = require('lodash._createcache'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._createcache) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._createcache) for more details. diff --git a/lodash._createcache/index.js b/lodash._createcache/index.js index eba712d35..f1a433cca 100644 --- a/lodash._createcache/index.js +++ b/lodash._createcache/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -9,7 +9,7 @@ var getNative = require('lodash._getnative'); /** Native method references. */ -var Set = getNative(root, 'Set'); +var Set = getNative(global, 'Set'); /* Native method references for those with the same name as other `lodash` methods. */ var nativeCreate = getNative(Object, 'create'); diff --git a/lodash._createcache/package.json b/lodash._createcache/package.json index 4e7abab42..0f567f1f6 100644 --- a/lodash._createcache/package.json +++ b/lodash._createcache/package.json @@ -1,6 +1,6 @@ { "name": "lodash._createcache", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s internal `createCache` 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 488b6329b..3fecca400 100644 --- a/lodash._createwrapper/README.md +++ b/lodash._createwrapper/README.md @@ -1,4 +1,4 @@ -# lodash._createwrapper v3.1.0 +# lodash._createwrapper v3.1.1 The internal [lodash](https://lodash.com/) function `createWrapper` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var createWrapper = require('lodash._createwrapper'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._createwrapper) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._createwrapper) for more details. diff --git a/lodash._createwrapper/index.js b/lodash._createwrapper/index.js index 311b5e64d..8b3eb1419 100644 --- a/lodash._createwrapper/index.js +++ b/lodash._createwrapper/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -49,9 +49,41 @@ var reIsOctal = /^0o[0-7]+$/i; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; -/** Built-in method references without a dependency on `global`. */ +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); + /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. @@ -59,11 +91,11 @@ var freeParseInt = parseInt; * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [args] The arguments to invoke `func` with. + * @param {...*} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { - var length = args ? args.length : 0; + var length = args.length; switch (length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); @@ -73,6 +105,17 @@ function apply(func, thisArg, args) { return func.apply(thisArg, args); } +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + /** * Checks if `value` is a valid array-like index. * @@ -112,7 +155,7 @@ function replaceHolders(array, placeholder) { } /** 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) @@ -240,7 +283,7 @@ function createBaseWrapper(func, bitmask, thisArg) { Ctor = createCtorWrapper(func); function wrapper() { - var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func; + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; @@ -295,7 +338,7 @@ function createCurryWrapper(func, bitmask, arity) { var length = arguments.length, index = length, args = Array(length), - fn = (this && this !== global && this instanceof wrapper) ? Ctor : func, + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func, placeholder = wrapper.placeholder; while (index--) { @@ -373,7 +416,7 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials if (isAry && ary < args.length) { args.length = ary; } - if (this && this !== global && this instanceof wrapper) { + if (this && this !== root && this instanceof wrapper) { fn = Ctor || createCtorWrapper(fn); } return fn.apply(thisBinding, args); @@ -403,7 +446,7 @@ function createPartialWrapper(func, bitmask, thisArg, partials) { leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), - fn = (this && this !== global && this instanceof wrapper) ? Ctor : func; + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; diff --git a/lodash._createwrapper/package.json b/lodash._createwrapper/package.json index 6cdb66343..85e65a939 100644 --- a/lodash._createwrapper/package.json +++ b/lodash._createwrapper/package.json @@ -1,6 +1,6 @@ { "name": "lodash._createwrapper", - "version": "3.1.0", + "version": "3.1.1", "description": "The internal lodash function `createWrapper` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.at/README.md b/lodash.at/README.md index a75af1186..585b7f1cc 100644 --- a/lodash.at/README.md +++ b/lodash.at/README.md @@ -1,4 +1,4 @@ -# lodash.at v3.1.0 +# lodash.at v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.at` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var at = require('lodash.at'); ``` -See the [documentation](https://lodash.com/docs#at) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.at) for more details. +See the [documentation](https://lodash.com/docs#at) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.at) for more details. diff --git a/lodash.at/index.js b/lodash.at/index.js index 16af39026..5ef099991 100644 --- a/lodash.at/index.js +++ b/lodash.at/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -17,6 +17,31 @@ var baseAt = require('lodash._baseat'), */ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; +/** + * 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]; + }; +} + +/** + * 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. + * + * @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. * @@ -51,7 +76,7 @@ function isLength(value) { * // => ['barney', 'pebbles'] */ var at = restParam(function(collection, props) { - var length = collection ? collection.length : 0; + var length = collection ? getLength(collection) : 0; if (isLength(length)) { collection = toIterable(collection); } diff --git a/lodash.at/package.json b/lodash.at/package.json index 887180f40..581e87979 100644 --- a/lodash.at/package.json +++ b/lodash.at/package.json @@ -1,6 +1,6 @@ { "name": "lodash.at", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.at` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.callback/LICENSE.txt b/lodash.callback/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.callback/LICENSE.txt +++ b/lodash.callback/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.callback/README.md b/lodash.callback/README.md index 9f9da833e..e2817e75f 100644 --- a/lodash.callback/README.md +++ b/lodash.callback/README.md @@ -1,4 +1,4 @@ -# lodash.callback v3.1.0 +# lodash.callback v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.callback` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var callback = require('lodash.callback'); ``` -See the [documentation](https://lodash.com/docs#callback) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.callback) for more details. +See the [documentation](https://lodash.com/docs#callback) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.callback) for more details. diff --git a/lodash.callback/index.js b/lodash.callback/index.js index 90eb49ddd..25693cc89 100644 --- a/lodash.callback/index.js +++ b/lodash.callback/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 + * Based on Underscore.js 1.8.2 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ @@ -19,7 +19,7 @@ var baseCallback = require('lodash._basecallback'), * @returns {boolean} Returns `true` if `value` is object-like, else `false`. */ function isObjectLike(value) { - return (value && typeof value == 'object') || false; + return !!value && typeof value == 'object'; } /** diff --git a/lodash.callback/package.json b/lodash.callback/package.json index fe8f45ff8..8eef2944a 100644 --- a/lodash.callback/package.json +++ b/lodash.callback/package.json @@ -1,6 +1,6 @@ { "name": "lodash.callback", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.callback` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.countby/README.md b/lodash.countby/README.md index 66bb651c9..adeb0d71e 100644 --- a/lodash.countby/README.md +++ b/lodash.countby/README.md @@ -1,4 +1,4 @@ -# lodash.countby v3.1.0 +# lodash.countby v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.countBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var countBy = require('lodash.countby'); ``` -See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.countby) for more details. +See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.countby) for more details. diff --git a/lodash.countby/index.js b/lodash.countby/index.js index ce260465a..81378039b 100644 --- a/lodash.countby/index.js +++ b/lodash.countby/index.js @@ -1,13 +1,12 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ -var createAggregator = require('lodash._createaggregator'), - keys = require('lodash.keys'); +var createAggregator = require('lodash._createaggregator'); /** Used for native method references. */ var objectProto = Object.prototype; diff --git a/lodash.countby/package.json b/lodash.countby/package.json index 9268c0934..c5a607ca4 100644 --- a/lodash.countby/package.json +++ b/lodash.countby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.countby", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.countBy` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.create/LICENSE.txt b/lodash.create/LICENSE similarity index 100% rename from lodash.create/LICENSE.txt rename to lodash.create/LICENSE diff --git a/lodash.create/README.md b/lodash.create/README.md index 581453fab..71f5d34fc 100644 --- a/lodash.create/README.md +++ b/lodash.create/README.md @@ -1,4 +1,4 @@ -# lodash.create v3.1.0 +# lodash.create v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.create` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var create = require('lodash.create'); ``` -See the [documentation](https://lodash.com/docs#create) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.create) for more details. +See the [documentation](https://lodash.com/docs#create) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.create) for more details. diff --git a/lodash.create/index.js b/lodash.create/index.js index e6d32521f..4fb721581 100644 --- a/lodash.create/index.js +++ b/lodash.create/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -47,7 +47,7 @@ var baseAssign = require('lodash._baseassign'), function create(prototype, properties, guard) { var result = baseCreate(prototype); if (guard && isIterateeCall(prototype, properties, guard)) { - properties = null; + properties = undefined; } return properties ? baseAssign(result, properties) : result; } diff --git a/lodash.create/package.json b/lodash.create/package.json index 6de6eaaf0..65c2b5c8d 100644 --- a/lodash.create/package.json +++ b/lodash.create/package.json @@ -1,6 +1,6 @@ { "name": "lodash.create", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.create` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.curry/LICENSE b/lodash.curry/LICENSE index b054ca5a3..bcbe13d67 100644 --- a/lodash.curry/LICENSE +++ b/lodash.curry/LICENSE @@ -1,22 +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: +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 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. +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.curry/README.md b/lodash.curry/README.md index 060577546..d633e2513 100644 --- a/lodash.curry/README.md +++ b/lodash.curry/README.md @@ -1,4 +1,4 @@ -# lodash.curry v3.1.0 +# lodash.curry v3.1.1 The [lodash](https://lodash.com/) method `_.curry` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var curry = require('lodash.curry'); ``` -See the [documentation](https://lodash.com/docs#curry) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.curry) for more details. +See the [documentation](https://lodash.com/docs#curry) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.curry) for more details. diff --git a/lodash.curry/index.js b/lodash.curry/index.js index 0ded7a574..52ccc22d0 100644 --- a/lodash.curry/index.js +++ b/lodash.curry/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -58,4 +58,7 @@ function curry(func, arity, guard) { return result; } +// Assign default placeholders. +curry.placeholder = {}; + module.exports = curry; diff --git a/lodash.curry/package.json b/lodash.curry/package.json index 5dbb88978..deb7143c5 100644 --- a/lodash.curry/package.json +++ b/lodash.curry/package.json @@ -1,11 +1,11 @@ { "name": "lodash.curry", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.curry` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, curry", + "keywords": "lodash-modularized, curry", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.curryright/LICENSE b/lodash.curryright/LICENSE index b054ca5a3..bcbe13d67 100644 --- a/lodash.curryright/LICENSE +++ b/lodash.curryright/LICENSE @@ -1,22 +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: +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 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. +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.curryright/README.md b/lodash.curryright/README.md index 7a39c250f..3ba234838 100644 --- a/lodash.curryright/README.md +++ b/lodash.curryright/README.md @@ -1,4 +1,4 @@ -# lodash.curryright v3.1.0 +# lodash.curryright v3.1.1 The [lodash](https://lodash.com/) method `_.curryRight` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var curryRight = require('lodash.curryright'); ``` -See the [documentation](https://lodash.com/docs#curryRight) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.curryright) for more details. +See the [documentation](https://lodash.com/docs#curryRight) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.curryright) for more details. diff --git a/lodash.curryright/index.js b/lodash.curryright/index.js index a217c416b..6f22617c8 100644 --- a/lodash.curryright/index.js +++ b/lodash.curryright/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -55,4 +55,7 @@ function curryRight(func, arity, guard) { return result; } +// Assign default placeholders. +curryRight.placeholder = {}; + module.exports = curryRight; diff --git a/lodash.curryright/package.json b/lodash.curryright/package.json index 63fec2954..9a928fd3f 100644 --- a/lodash.curryright/package.json +++ b/lodash.curryright/package.json @@ -1,11 +1,11 @@ { "name": "lodash.curryright", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.curryRight` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, curryright", + "keywords": "lodash-modularized, curryright", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.debounce/LICENSE.txt b/lodash.debounce/LICENSE similarity index 100% rename from lodash.debounce/LICENSE.txt rename to lodash.debounce/LICENSE diff --git a/lodash.debounce/README.md b/lodash.debounce/README.md index 6a3c1c18d..0bacaf68d 100644 --- a/lodash.debounce/README.md +++ b/lodash.debounce/README.md @@ -1,4 +1,4 @@ -# lodash.debounce v3.1.0 +# lodash.debounce v3.1.1 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.1.0-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.1.1-npm-packages/lodash.debounce) for more details. diff --git a/lodash.debounce/index.js b/lodash.debounce/index.js index d6074e0cf..75a37afdd 100644 --- a/lodash.debounce/index.js +++ b/lodash.debounce/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -58,7 +58,7 @@ var now = nativeNow || function() { * @param {boolean} [options.leading=false] Specify invoking on the leading * edge of the timeout. * @param {number} [options.maxWait] The maximum time `func` is allowed to be - * delayed before it is invoked. + * delayed before it's invoked. * @param {boolean} [options.trailing=true] Specify invoking on the trailing * edge of the timeout. * @returns {Function} Returns the new debounced function. @@ -116,9 +116,9 @@ function debounce(func, wait, options) { var leading = true; trailing = false; } else if (isObject(options)) { - leading = options.leading; + leading = !!options.leading; maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); - trailing = 'trailing' in options ? options.trailing : trailing; + trailing = 'trailing' in options ? !!options.trailing : trailing; } function cancel() { @@ -128,41 +128,35 @@ function debounce(func, wait, options) { if (maxTimeoutId) { clearTimeout(maxTimeoutId); } + lastCalled = 0; maxTimeoutId = timeoutId = trailingCall = undefined; } + function complete(isCalled, id) { + if (id) { + clearTimeout(id); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + } + } + function delayed() { var remaining = wait - (now() - stamp); if (remaining <= 0 || remaining > wait) { - if (maxTimeoutId) { - clearTimeout(maxTimeoutId); - } - var isCalled = trailingCall; - maxTimeoutId = timeoutId = trailingCall = undefined; - if (isCalled) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - } + complete(trailingCall, maxTimeoutId); } else { timeoutId = setTimeout(delayed, remaining); } } function maxDelayed() { - if (timeoutId) { - clearTimeout(timeoutId); - } - maxTimeoutId = timeoutId = trailingCall = undefined; - if (trailing || (maxWait !== wait)) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = null; - } - } + complete(trailing, timeoutId); } function debounced() { @@ -202,7 +196,7 @@ function debounce(func, wait, options) { result = func.apply(thisArg, args); } if (isCalled && !timeoutId && !maxTimeoutId) { - args = thisArg = null; + args = thisArg = undefined; } return result; } diff --git a/lodash.debounce/package.json b/lodash.debounce/package.json index 00c6cecf8..26038cd78 100644 --- a/lodash.debounce/package.json +++ b/lodash.debounce/package.json @@ -1,6 +1,6 @@ { "name": "lodash.debounce", - "version": "3.1.0", + "version": "3.1.1", "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.deburr/README.md b/lodash.deburr/README.md index 1cdf3b55f..d546865e5 100644 --- a/lodash.deburr/README.md +++ b/lodash.deburr/README.md @@ -1,4 +1,4 @@ -# lodash.deburr v3.1.0 +# lodash.deburr v3.1.1 The [lodash](https://lodash.com/) method `_.deburr` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var deburr = require('lodash.deburr'); ``` -See the [documentation](https://lodash.com/docs#deburr) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.deburr) for more details. +See the [documentation](https://lodash.com/docs#deburr) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.deburr) for more details. diff --git a/lodash.deburr/index.js b/lodash.deburr/index.js index 27a22e843..97bb5c480 100644 --- a/lodash.deburr/index.js +++ b/lodash.deburr/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -17,12 +17,16 @@ var symbolTag = '[object Symbol]'; var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; /** Used to compose unicode character classes. */ -var rsComboRange = '\\u0300-\\u036f\\ufe20-\\ufe23'; +var rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', + rsComboSymbolsRange = '\\u20d0-\\u20f0'; /** Used to compose unicode capture groups. */ -var rsCombo = '[' + rsComboRange + ']'; +var rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']'; -/** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ +/** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ var reComboMark = RegExp(rsCombo, 'g'); /** Used to map latin-1 supplementary letters to basic latin letters. */ @@ -67,11 +71,11 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Checks if `value` is object-like. A value is object-like if it's not `null` @@ -150,7 +154,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/lodash.deburr/package.json b/lodash.deburr/package.json index 257194208..c306c6ca1 100644 --- a/lodash.deburr/package.json +++ b/lodash.deburr/package.json @@ -1,6 +1,6 @@ { "name": "lodash.deburr", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.deburr` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.defaults/README.md b/lodash.defaults/README.md index b91815c58..81102d88f 100644 --- a/lodash.defaults/README.md +++ b/lodash.defaults/README.md @@ -1,4 +1,4 @@ -# lodash.defaults v3.1.0 +# lodash.defaults v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.defaults` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var defaults = require('lodash.defaults'); ``` -See the [documentation](https://lodash.com/docs#defaults) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.defaults) for more details. +See the [documentation](https://lodash.com/docs#defaults) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.defaults) for more details. diff --git a/lodash.defaults/index.js b/lodash.defaults/index.js index 85e67ac87..c9ccb3218 100644 --- a/lodash.defaults/index.js +++ b/lodash.defaults/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -18,7 +18,7 @@ var assign = require('lodash.assign'), * @returns {*} Returns the value to assign to the destination object. */ function assignDefaults(objectValue, sourceValue) { - return typeof objectValue == 'undefined' ? sourceValue : objectValue; + return objectValue === undefined ? sourceValue : objectValue; } /** @@ -26,6 +26,8 @@ function assignDefaults(objectValue, sourceValue) { * object for all destination properties that resolve to `undefined`. Once a * property is set, additional values of the same property are ignored. * + * **Note:** This method mutates `object`. + * * @static * @memberOf _ * @category Object diff --git a/lodash.defaults/package.json b/lodash.defaults/package.json index 331ceb47a..39d22e86c 100644 --- a/lodash.defaults/package.json +++ b/lodash.defaults/package.json @@ -1,6 +1,6 @@ { "name": "lodash.defaults", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.defaults` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.droprightwhile/README.md b/lodash.droprightwhile/README.md index 006a40f0a..f57cedd78 100644 --- a/lodash.droprightwhile/README.md +++ b/lodash.droprightwhile/README.md @@ -1,4 +1,4 @@ -# lodash.droprightwhile v3.1.0 +# lodash.droprightwhile v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.dropRightWhile` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var dropRightWhile = require('lodash.droprightwhile'); ``` -See the [documentation](https://lodash.com/docs#dropRightWhile) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.droprightwhile) for more details. +See the [documentation](https://lodash.com/docs#dropRightWhile) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.droprightwhile) for more details. diff --git a/lodash.droprightwhile/index.js b/lodash.droprightwhile/index.js index be9e8c754..a47b4f172 100644 --- a/lodash.droprightwhile/index.js +++ b/lodash.droprightwhile/index.js @@ -1,14 +1,13 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ var baseCallback = require('lodash._basecallback'), - baseSlice = require('lodash._baseslice'), - isArray = require('lodash.isarray'); + baseSlice = require('lodash._baseslice'); /** * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, diff --git a/lodash.droprightwhile/package.json b/lodash.droprightwhile/package.json index 5cbfacd88..620e00dff 100644 --- a/lodash.droprightwhile/package.json +++ b/lodash.droprightwhile/package.json @@ -1,6 +1,6 @@ { "name": "lodash.droprightwhile", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.dropRightWhile` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.dropwhile/README.md b/lodash.dropwhile/README.md index 674dae23e..5a17ee278 100644 --- a/lodash.dropwhile/README.md +++ b/lodash.dropwhile/README.md @@ -1,4 +1,4 @@ -# lodash.dropwhile v3.1.0 +# lodash.dropwhile v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.dropWhile` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var dropWhile = require('lodash.dropwhile'); ``` -See the [documentation](https://lodash.com/docs#dropWhile) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.dropwhile) for more details. +See the [documentation](https://lodash.com/docs#dropWhile) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.dropwhile) for more details. diff --git a/lodash.dropwhile/index.js b/lodash.dropwhile/index.js index 8e450f01a..a8e6d1b07 100644 --- a/lodash.dropwhile/index.js +++ b/lodash.dropwhile/index.js @@ -1,14 +1,13 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ var baseCallback = require('lodash._basecallback'), - baseSlice = require('lodash._baseslice'), - isArray = require('lodash.isarray'); + baseSlice = require('lodash._baseslice'); /** * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, diff --git a/lodash.dropwhile/package.json b/lodash.dropwhile/package.json index 024a31789..34db079bb 100644 --- a/lodash.dropwhile/package.json +++ b/lodash.dropwhile/package.json @@ -1,6 +1,6 @@ { "name": "lodash.dropwhile", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.dropWhile` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.endswith/README.md b/lodash.endswith/README.md index 10b6abcbe..56a625af2 100644 --- a/lodash.endswith/README.md +++ b/lodash.endswith/README.md @@ -1,4 +1,4 @@ -# lodash.endswith v3.1.0 +# lodash.endswith v3.1.1 The [lodash](https://lodash.com/) method `_.endsWith` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var endsWith = require('lodash.endswith'); ``` -See the [documentation](https://lodash.com/docs#endsWith) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.endswith) for more details. +See the [documentation](https://lodash.com/docs#endsWith) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.endswith) for more details. diff --git a/lodash.endswith/index.js b/lodash.endswith/index.js index ca91525f3..45074e66d 100644 --- a/lodash.endswith/index.js +++ b/lodash.endswith/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -42,11 +42,11 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * The base implementation of `_.clamp` which doesn't coerce arguments to numbers. @@ -117,8 +117,6 @@ function isFunction(value) { * // => 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'); } @@ -274,7 +272,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/lodash.endswith/package.json b/lodash.endswith/package.json index 59d44fd04..908416454 100644 --- a/lodash.endswith/package.json +++ b/lodash.endswith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.endswith", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.endsWith` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.escape/README.md b/lodash.escape/README.md index b86621fa3..72135867d 100644 --- a/lodash.escape/README.md +++ b/lodash.escape/README.md @@ -1,4 +1,4 @@ -# lodash.escape v3.1.0 +# lodash.escape v3.1.1 The [lodash](https://lodash.com/) method `_.escape` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var escape = require('lodash.escape'); ``` -See the [documentation](https://lodash.com/docs#escape) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.escape) for more details. +See the [documentation](https://lodash.com/docs#escape) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.escape) for more details. diff --git a/lodash.escape/index.js b/lodash.escape/index.js index 500cb7c15..a2146181d 100644 --- a/lodash.escape/index.js +++ b/lodash.escape/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -48,11 +48,11 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Checks if `value` is object-like. A value is object-like if it's not `null` @@ -131,7 +131,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/lodash.escape/package.json b/lodash.escape/package.json index c939cf4cd..798cceb7d 100644 --- a/lodash.escape/package.json +++ b/lodash.escape/package.json @@ -1,6 +1,6 @@ { "name": "lodash.escape", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.escape` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.filter/README.md b/lodash.filter/README.md index c9543d687..c48f77080 100644 --- a/lodash.filter/README.md +++ b/lodash.filter/README.md @@ -1,4 +1,4 @@ -# lodash.filter v3.1.0 +# lodash.filter v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.filter` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var filter = require('lodash.filter'); ``` -See the [documentation](https://lodash.com/docs#filter) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.filter) for more details. +See the [documentation](https://lodash.com/docs#filter) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.filter) for more details. diff --git a/lodash.filter/index.js b/lodash.filter/index.js index 3853fd58e..14c91be58 100644 --- a/lodash.filter/index.js +++ b/lodash.filter/index.js @@ -1,16 +1,15 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ var arrayFilter = require('lodash._arrayfilter'), baseCallback = require('lodash._basecallback'), baseFilter = require('lodash._basefilter'), - isArray = require('lodash.isarray'), - keys = require('lodash.keys'); + isArray = require('lodash.isarray'); /** * Iterates over elements of `collection`, returning an array of all elements diff --git a/lodash.filter/package.json b/lodash.filter/package.json index 21fae36fb..e6ef808d9 100644 --- a/lodash.filter/package.json +++ b/lodash.filter/package.json @@ -1,6 +1,6 @@ { "name": "lodash.filter", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.filter` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.groupby/README.md b/lodash.groupby/README.md index d53fc59b4..9a50833a0 100644 --- a/lodash.groupby/README.md +++ b/lodash.groupby/README.md @@ -1,4 +1,4 @@ -# lodash.groupby v3.1.0 +# lodash.groupby v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.groupBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var groupBy = require('lodash.groupby'); ``` -See the [documentation](https://lodash.com/docs#groupBy) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.groupby) for more details. +See the [documentation](https://lodash.com/docs#groupBy) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.groupby) for more details. diff --git a/lodash.groupby/index.js b/lodash.groupby/index.js index 6033d3f3c..5aa9241e8 100644 --- a/lodash.groupby/index.js +++ b/lodash.groupby/index.js @@ -1,13 +1,12 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ -var createAggregator = require('lodash._createaggregator'), - keys = require('lodash.keys'); +var createAggregator = require('lodash._createaggregator'); /** Used for native method references. */ var objectProto = Object.prototype; diff --git a/lodash.groupby/package.json b/lodash.groupby/package.json index 117136bc7..3d64c834a 100644 --- a/lodash.groupby/package.json +++ b/lodash.groupby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.groupby", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.groupBy` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.has/README.md b/lodash.has/README.md index d88c0a0e0..56d759294 100644 --- a/lodash.has/README.md +++ b/lodash.has/README.md @@ -1,4 +1,4 @@ -# lodash.has v3.1.0 +# lodash.has v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.has` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var has = require('lodash.has'); ``` -See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.has) for more details. +See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.has) for more details. diff --git a/lodash.has/index.js b/lodash.has/index.js index 283373ab8..c22e9b729 100644 --- a/lodash.has/index.js +++ b/lodash.has/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -12,7 +12,7 @@ var baseGet = require('lodash._baseget'), isArray = require('lodash.isarray'); /** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/, +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** Used for native method references. */ diff --git a/lodash.has/package.json b/lodash.has/package.json index da8960439..77a93661c 100644 --- a/lodash.has/package.json +++ b/lodash.has/package.json @@ -1,6 +1,6 @@ { "name": "lodash.has", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.has` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.includes/README.md b/lodash.includes/README.md index 5323c151f..2cb77ea1c 100644 --- a/lodash.includes/README.md +++ b/lodash.includes/README.md @@ -1,4 +1,4 @@ -# lodash.includes v3.1.0 +# lodash.includes v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.includes` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var includes = require('lodash.includes'); ``` -See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.includes) for more details. +See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.includes) for more details. diff --git a/lodash.includes/index.js b/lodash.includes/index.js index 81822cdf8..0da4a524f 100644 --- a/lodash.includes/index.js +++ b/lodash.includes/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -22,6 +22,31 @@ var nativeMax = Math.max; */ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; +/** + * 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]; + }; +} + +/** + * 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. * @@ -36,13 +61,10 @@ function isLength(value) { } /** - * Checks if `value` is in `collection` using `SameValueZero` for equality - * comparisons. If `fromIndex` is negative, it is used as the offset from - * the end of `collection`. - * - * **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * comparisons are like strict equality comparisons, e.g. `===`, except that - * `NaN` matches `NaN`. + * Checks if `value` is in `collection` 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 + * from the end of `collection`. * * @static * @memberOf _ @@ -68,7 +90,7 @@ function isLength(value) { * // => true */ function includes(collection, target, fromIndex, guard) { - var length = collection ? collection.length : 0; + var length = collection ? getLength(collection) : 0; if (!isLength(length)) { collection = values(collection); length = collection.length; diff --git a/lodash.includes/package.json b/lodash.includes/package.json index 2569b1e18..ba93194f8 100644 --- a/lodash.includes/package.json +++ b/lodash.includes/package.json @@ -1,6 +1,6 @@ { "name": "lodash.includes", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.includes` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.indexby/README.md b/lodash.indexby/README.md index 94a37274e..183c6462a 100644 --- a/lodash.indexby/README.md +++ b/lodash.indexby/README.md @@ -1,4 +1,4 @@ -# lodash.indexby v3.1.0 +# lodash.indexby v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.indexBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var indexBy = require('lodash.indexby'); ``` -See the [documentation](https://lodash.com/docs#indexBy) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.indexby) for more details. +See the [documentation](https://lodash.com/docs#indexBy) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.indexby) for more details. diff --git a/lodash.indexby/index.js b/lodash.indexby/index.js index 62bdd0696..fb178ef02 100644 --- a/lodash.indexby/index.js +++ b/lodash.indexby/index.js @@ -1,13 +1,12 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ -var createAggregator = require('lodash._createaggregator'), - keys = require('lodash.keys'); +var createAggregator = require('lodash._createaggregator'); /** * Creates an object composed of keys generated from the results of running diff --git a/lodash.indexby/package.json b/lodash.indexby/package.json index ae9be067d..16c7596e9 100644 --- a/lodash.indexby/package.json +++ b/lodash.indexby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.indexby", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.indexBy` 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 100ab0dff..990f48efb 100644 --- a/lodash.iserror/README.md +++ b/lodash.iserror/README.md @@ -1,4 +1,4 @@ -# lodash.iserror v3.1.0 +# lodash.iserror v3.1.1 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.1.0-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.1.1-npm-packages/lodash.iserror) for more details. diff --git a/lodash.iserror/index.js b/lodash.iserror/index.js index 947e51338..279a77b7f 100644 --- a/lodash.iserror/index.js +++ b/lodash.iserror/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -14,7 +14,8 @@ var errorTag = '[object Error]'; 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/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -25,6 +26,7 @@ var objectToString = objectProto.toString; * * @static * @memberOf _ + * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an error object, else `false`. @@ -40,9 +42,8 @@ function isError(value) { if (!isObjectLike(value)) { return false; } - var Ctor = value.constructor; return (objectToString.call(value) == errorTag) || - (typeof Ctor == 'function' && objectToString.call(Ctor.prototype) == errorTag); + (typeof value.message == 'string' && typeof value.name == 'string'); } /** @@ -51,6 +52,7 @@ function isError(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.iserror/package.json b/lodash.iserror/package.json index af1167071..c40bedb9e 100644 --- a/lodash.iserror/package.json +++ b/lodash.iserror/package.json @@ -1,6 +1,6 @@ { "name": "lodash.iserror", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.isError` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.ismatch/LICENSE.txt b/lodash.ismatch/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.ismatch/LICENSE.txt +++ b/lodash.ismatch/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.ismatch/README.md b/lodash.ismatch/README.md index 10a6e3216..8a507bc88 100644 --- a/lodash.ismatch/README.md +++ b/lodash.ismatch/README.md @@ -1,4 +1,4 @@ -# lodash.ismatch v3.1.0 +# lodash.ismatch v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isMatch` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isMatch = require('lodash.ismatch'); ``` -See the [documentation](https://lodash.com/docs#isMatch) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.ismatch) for more details. +See the [documentation](https://lodash.com/docs#isMatch) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.ismatch) for more details. diff --git a/lodash.ismatch/index.js b/lodash.ismatch/index.js index a2abefb10..74de997af 100644 --- a/lodash.ismatch/index.js +++ b/lodash.ismatch/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -10,12 +10,6 @@ var baseIsMatch = require('lodash._baseismatch'), bindCallback = require('lodash._bindcallback'), keys = require('lodash.keys'); -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * @@ -29,10 +23,19 @@ function isStrictComparable(value) { } /** - * Checks if `value` is the language type of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Converts `value` to an object if it is not one. * - * **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details. + * @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 _ @@ -54,7 +57,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'); } /** @@ -62,7 +65,7 @@ function isObject(value) { * `object` contains equivalent property values. If `customizer` is provided * it is invoked to compare values. If `customizer` returns `undefined` * comparisons are handled by the method instead. The `customizer` is bound - * to `thisArg` and invoked with three arguments; (value, other, index|key). + * to `thisArg` and invoked with three arguments: (value, other, index|key). * * **Note:** This method supports comparing properties of arrays, booleans, * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions @@ -100,13 +103,19 @@ function isMatch(object, source, customizer, thisArg) { var props = keys(source), length = props.length; + if (!length) { + return true; + } + if (object == null) { + return false; + } customizer = typeof customizer == 'function' && bindCallback(customizer, thisArg, 3); if (!customizer && length == 1) { var key = props[0], value = source[key]; if (isStrictComparable(value)) { - return object != null && value === object[key] && hasOwnProperty.call(object, key); + return value === object[key] && (typeof value != 'undefined' || (key in toObject(object))); } } var values = Array(length), @@ -116,7 +125,7 @@ function isMatch(object, source, customizer, thisArg) { value = values[length] = source[props[length]]; strictCompareFlags[length] = isStrictComparable(value); } - return baseIsMatch(object, props, values, strictCompareFlags, customizer); + return baseIsMatch(toObject(object), props, values, strictCompareFlags, customizer); } module.exports = isMatch; diff --git a/lodash.ismatch/package.json b/lodash.ismatch/package.json index 946d2397f..876ce516f 100644 --- a/lodash.ismatch/package.json +++ b/lodash.ismatch/package.json @@ -1,6 +1,6 @@ { "name": "lodash.ismatch", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.isMatch` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.kebabcase/README.md b/lodash.kebabcase/README.md index bfbe55af7..ee073e7e9 100644 --- a/lodash.kebabcase/README.md +++ b/lodash.kebabcase/README.md @@ -1,4 +1,4 @@ -# lodash.kebabcase v3.1.0 +# lodash.kebabcase v3.1.1 The [lodash](https://lodash.com/) method `_.kebabCase` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var kebabCase = require('lodash.kebabcase'); ``` -See the [documentation](https://lodash.com/docs#kebabCase) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.kebabcase) for more details. +See the [documentation](https://lodash.com/docs#kebabCase) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.kebabcase) for more details. diff --git a/lodash.kebabcase/index.js b/lodash.kebabcase/index.js index 5ecafc2c7..879cfe654 100644 --- a/lodash.kebabcase/index.js +++ b/lodash.kebabcase/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -17,14 +17,14 @@ var deburr = require('lodash.deburr'), * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. - * @param {boolean} [initFromArray] Specify using the first element of `array` as the initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value. * @returns {*} Returns the accumulated value. */ -function arrayReduce(array, iteratee, accumulator, initFromArray) { +function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array.length; - if (initFromArray && length) { + if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { diff --git a/lodash.kebabcase/package.json b/lodash.kebabcase/package.json index 7567e3537..d600c40f7 100644 --- a/lodash.kebabcase/package.json +++ b/lodash.kebabcase/package.json @@ -1,6 +1,6 @@ { "name": "lodash.kebabcase", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.kebabCase` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.keys/README.md b/lodash.keys/README.md index 3dec3fb20..88dc7d5ad 100644 --- a/lodash.keys/README.md +++ b/lodash.keys/README.md @@ -1,4 +1,4 @@ -# lodash.keys v3.1.0 +# lodash.keys v3.1.1 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.1.0-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.1.1-npm-packages/lodash.keys) for more details. diff --git a/lodash.keys/index.js b/lodash.keys/index.js index 736827857..4f3e61eba 100644 --- a/lodash.keys/index.js +++ b/lodash.keys/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -10,6 +10,9 @@ var getNative = require('lodash._getnative'), isArguments = require('lodash.isarguments'), isArray = require('lodash.isarray'); +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + /** Used for native method references. */ var objectProto = Object.prototype; @@ -70,7 +73,7 @@ function isArrayLike(value) { * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { - value = typeof value == 'number' ? value : parseFloat(value); + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; length = length == null ? MAX_SAFE_INTEGER : length; return value > -1 && value % 1 == 0 && value < length; } diff --git a/lodash.keys/package.json b/lodash.keys/package.json index 9a044b6df..788a1b355 100644 --- a/lodash.keys/package.json +++ b/lodash.keys/package.json @@ -1,6 +1,6 @@ { "name": "lodash.keys", - "version": "3.1.0", + "version": "3.1.1", "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.map/README.md b/lodash.map/README.md index 19d3b1dd8..cf728cc39 100644 --- a/lodash.map/README.md +++ b/lodash.map/README.md @@ -1,4 +1,4 @@ -# lodash.map v3.1.0 +# lodash.map v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.map` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var map = require('lodash.map'); ``` -See the [documentation](https://lodash.com/docs#map) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.map) for more details. +See the [documentation](https://lodash.com/docs#map) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.map) for more details. diff --git a/lodash.map/index.js b/lodash.map/index.js index 9efcb9b64..5ea9ecf62 100644 --- a/lodash.map/index.js +++ b/lodash.map/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -12,6 +12,12 @@ var arrayMap = require('lodash._arraymap'), isArray = require('lodash.isarray'), keys = require('lodash.keys'); +/** + * 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; + /** * The base implementation of `_.map` without support for callback shorthands * and `this` binding. @@ -22,13 +28,54 @@ var arrayMap = require('lodash._arraymap'), * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { - var result = []; + var index = -1, + length = getLength(collection), + result = isLength(length) ? Array(length) : []; + baseEach(collection, function(value, key, collection) { - result.push(iteratee(value, key, collection)); + result[++index] = iteratee(value, key, collection); }); return result; } +/** + * 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]; + }; +} + +/** + * 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. + * + * @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. + * + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + /** * Creates an array of values by running each element in `collection` through * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three @@ -61,7 +108,6 @@ function baseMap(collection, iteratee) { * @param {Array|Object|string} collection The collection to iterate over. * @param {Function|Object|string} [iteratee=_.identity] The function invoked * per iteration. - * create a `_.property` or `_.matches` style callback respectively. * @param {*} [thisArg] The `this` binding of `iteratee`. * @returns {Array} Returns the new mapped array. * @example diff --git a/lodash.map/package.json b/lodash.map/package.json index e257bc9c0..7cd2847da 100644 --- a/lodash.map/package.json +++ b/lodash.map/package.json @@ -1,6 +1,6 @@ { "name": "lodash.map", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.map` 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 a67b66a29..233aa3fde 100644 --- a/lodash.memoize/README.md +++ b/lodash.memoize/README.md @@ -1,4 +1,4 @@ -# lodash.memoize v3.1.0 +# lodash.memoize v3.1.1 The [lodash](https://lodash.com/) method `_.memoize` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var memoize = require('lodash.memoize'); ``` -See the [documentation](https://lodash.com/docs#memoize) or [package source](https://github.com/lodash/lodash/blob/3.1.0-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.1.1-npm-packages/lodash.memoize) for more details. diff --git a/lodash.memoize/index.js b/lodash.memoize/index.js index c7f9f006a..ac8eef675 100644 --- a/lodash.memoize/index.js +++ b/lodash.memoize/index.js @@ -1,27 +1,101 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ -var MapCache = require('lodash._mapcache'); /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a cache object to store key/value pairs. + * + * @private + * @static + * @name Cache + * @memberOf _.memoize + */ +function MapCache() { + this.__data__ = {}; +} + +/** + * Removes `key` and its value from the cache. + * + * @private + * @name delete + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`. + */ +function mapDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the cached value for `key`. + * + * @private + * @name get + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to get. + * @returns {*} Returns the cached value. + */ +function mapGet(key) { + return key == '__proto__' ? undefined : this.__data__[key]; +} + +/** + * Checks if a cached value for `key` exists. + * + * @private + * @name has + * @memberOf _.memoize.Cache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapHas(key) { + return key != '__proto__' && hasOwnProperty.call(this.__data__, key); +} + +/** + * Sets `value` to `key` of the cache. + * + * @private + * @name set + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to cache. + * @param {*} value The value to cache. + * @returns {Object} Returns the cache object. + */ +function mapSet(key, value) { + if (key != '__proto__') { + this.__data__[key] = value; + } + return this; +} + /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. + * provided to the memoized function is coerced to a string and used as the + * cache key. The `func` is invoked with the `this` binding of the memoized + * function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. + * method interface of `get`, `has`, and `set`. * * @static * @memberOf _ @@ -31,27 +105,35 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @returns {Function} Returns the new memoizing function. * @example * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; + * var upperCase = _.memoize(function(string) { + * return string.toUpperCase(); + * }); * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] + * upperCase('fred'); + * // => 'FRED' * * // modifying the result cache - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] + * upperCase.cache.set('fred', 'BARNEY'); + * upperCase('fred'); + * // => 'BARNEY' * * // replacing `_.memoize.Cache` + * var object = { 'user': 'fred' }; + * var other = { 'user': 'barney' }; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'fred' } + * * _.memoize.Cache = WeakMap; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'barney' } */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { @@ -73,6 +155,12 @@ function memoize(func, resolver) { return memoized; } +// Add functions to the `Map` cache. +MapCache.prototype['delete'] = mapDelete; +MapCache.prototype.get = mapGet; +MapCache.prototype.has = mapHas; +MapCache.prototype.set = mapSet; + // Assign cache to `_.memoize`. memoize.Cache = MapCache; diff --git a/lodash.memoize/package.json b/lodash.memoize/package.json index 32d91c3ce..25166284b 100644 --- a/lodash.memoize/package.json +++ b/lodash.memoize/package.json @@ -1,6 +1,6 @@ { "name": "lodash.memoize", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.memoize` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -13,8 +13,5 @@ "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "dependencies": { - "lodash._mapcache": "^3.0.0" - } + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } } diff --git a/lodash.pad/LICENSE.txt b/lodash.pad/LICENSE similarity index 100% rename from lodash.pad/LICENSE.txt rename to lodash.pad/LICENSE diff --git a/lodash.pad/README.md b/lodash.pad/README.md index 9b4891cd8..456d23ddf 100644 --- a/lodash.pad/README.md +++ b/lodash.pad/README.md @@ -1,4 +1,4 @@ -# lodash.pad v3.1.0 +# lodash.pad v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.pad` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var pad = require('lodash.pad'); ``` -See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.pad) for more details. +See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.pad) for more details. diff --git a/lodash.pad/index.js b/lodash.pad/index.js index 7a491819f..a29ccea9c 100644 --- a/lodash.pad/index.js +++ b/lodash.pad/index.js @@ -1,20 +1,18 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ var baseToString = require('lodash._basetostring'), createPadding = require('lodash._createpadding'); -/** Native method references. */ -var ceil = Math.ceil, - floor = Math.floor; - /* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsFinite = global.isFinite; +var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeIsFinite = global.isFinite; /** * Pads `string` on the left and right sides if it's shorter than `length`. @@ -47,8 +45,8 @@ function pad(string, length, chars) { return string; } var mid = (length - strLength) / 2, - leftLength = floor(mid), - rightLength = ceil(mid); + leftLength = nativeFloor(mid), + rightLength = nativeCeil(mid); chars = createPadding('', rightLength, chars); return chars.slice(0, leftLength) + string + chars; diff --git a/lodash.pad/package.json b/lodash.pad/package.json index 6af5e7aa0..14413b8f0 100644 --- a/lodash.pad/package.json +++ b/lodash.pad/package.json @@ -1,6 +1,6 @@ { "name": "lodash.pad", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.pad` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.padleft/README.md b/lodash.padleft/README.md index bb634f538..641b4d6f0 100644 --- a/lodash.padleft/README.md +++ b/lodash.padleft/README.md @@ -1,4 +1,4 @@ -# lodash.padleft v3.1.0 +# lodash.padleft v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.padLeft` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var padLeft = require('lodash.padleft'); ``` -See the [documentation](https://lodash.com/docs#padLeft) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.padleft) for more details. +See the [documentation](https://lodash.com/docs#padLeft) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.padleft) for more details. diff --git a/lodash.padleft/index.js b/lodash.padleft/index.js index 69638d322..cadc1573c 100644 --- a/lodash.padleft/index.js +++ b/lodash.padleft/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 baseToString = require('lodash._basetostring'), function createPadDir(fromRight) { return function(string, length, chars) { string = baseToString(string); - return string && ((fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string)); + return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string); }; } /** - * Pads `string` on the left side if it is shorter than `length`. Padding + * Pads `string` on the left side if it's shorter than `length`. Padding * characters are truncated if they exceed `length`. * * @static diff --git a/lodash.padleft/package.json b/lodash.padleft/package.json index f2fbe534b..455c1be30 100644 --- a/lodash.padleft/package.json +++ b/lodash.padleft/package.json @@ -1,6 +1,6 @@ { "name": "lodash.padleft", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.padLeft` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.padright/README.md b/lodash.padright/README.md index e1a742aeb..bcd6e5742 100644 --- a/lodash.padright/README.md +++ b/lodash.padright/README.md @@ -1,4 +1,4 @@ -# lodash.padright v3.1.0 +# lodash.padright v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.padRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var padRight = require('lodash.padright'); ``` -See the [documentation](https://lodash.com/docs#padRight) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.padright) for more details. +See the [documentation](https://lodash.com/docs#padRight) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.padright) for more details. diff --git a/lodash.padright/index.js b/lodash.padright/index.js index 252e0a131..81a31343c 100644 --- a/lodash.padright/index.js +++ b/lodash.padright/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 baseToString = require('lodash._basetostring'), function createPadDir(fromRight) { return function(string, length, chars) { string = baseToString(string); - return string && ((fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string)); + return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string); }; } /** - * Pads `string` on the right side if it is shorter than `length`. Padding + * Pads `string` on the right side if it's shorter than `length`. Padding * characters are truncated if they exceed `length`. * * @static diff --git a/lodash.padright/package.json b/lodash.padright/package.json index 1ba642f2e..5cb8b4f4c 100644 --- a/lodash.padright/package.json +++ b/lodash.padright/package.json @@ -1,6 +1,6 @@ { "name": "lodash.padright", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.padRight` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.parseint/README.md b/lodash.parseint/README.md index bd69bcbb9..d7f99032e 100644 --- a/lodash.parseint/README.md +++ b/lodash.parseint/README.md @@ -1,4 +1,4 @@ -# lodash.parseint v3.1.0 +# lodash.parseint v3.1.1 The [lodash](https://lodash.com/) method `_.parseInt` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var parseInt = require('lodash.parseint'); ``` -See the [documentation](https://lodash.com/docs#parseInt) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.parseint) for more details. +See the [documentation](https://lodash.com/docs#parseInt) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.parseint) for more details. diff --git a/lodash.parseint/index.js b/lodash.parseint/index.js index d7b2aaf49..efa2c83ed 100644 --- a/lodash.parseint/index.js +++ b/lodash.parseint/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -29,14 +29,14 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeParseInt = global.parseInt; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Checks if `value` is object-like. A value is object-like if it's not `null` @@ -115,7 +115,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; @@ -126,7 +126,7 @@ function toString(value) { * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal, * in which case a `radix` of `16` is used. * - * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E) + * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#x15.1.2.2) * of `parseInt`. * * @static diff --git a/lodash.parseint/package.json b/lodash.parseint/package.json index 89c65b157..cd73417cc 100644 --- a/lodash.parseint/package.json +++ b/lodash.parseint/package.json @@ -1,6 +1,6 @@ { "name": "lodash.parseint", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.parseInt` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.partial/LICENSE.txt b/lodash.partial/LICENSE similarity index 100% rename from lodash.partial/LICENSE.txt rename to lodash.partial/LICENSE diff --git a/lodash.partial/README.md b/lodash.partial/README.md index e0187bb9d..2ade46afa 100644 --- a/lodash.partial/README.md +++ b/lodash.partial/README.md @@ -1,4 +1,4 @@ -# lodash.partial v3.1.0 +# lodash.partial v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.partial` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var partial = require('lodash.partial'); ``` -See the [documentation](https://lodash.com/docs#partial) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.partial) for more details. +See the [documentation](https://lodash.com/docs#partial) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.partial) for more details. diff --git a/lodash.partial/index.js b/lodash.partial/index.js index 453956ee0..084b05662 100644 --- a/lodash.partial/index.js +++ b/lodash.partial/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -23,7 +23,7 @@ var PARTIAL_FLAG = 32; function createPartial(flag) { var partialFunc = restParam(function(func, partials) { var holders = replaceHolders(partials, partialFunc.placeholder); - return createWrapper(func, flag, null, partials, holders); + return createWrapper(func, flag, undefined, partials, holders); }); return partialFunc; } diff --git a/lodash.partial/package.json b/lodash.partial/package.json index 58dc1e71b..28d0a4145 100644 --- a/lodash.partial/package.json +++ b/lodash.partial/package.json @@ -1,6 +1,6 @@ { "name": "lodash.partial", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.partial` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.partialright/LICENSE.txt b/lodash.partialright/LICENSE similarity index 100% rename from lodash.partialright/LICENSE.txt rename to lodash.partialright/LICENSE diff --git a/lodash.partialright/README.md b/lodash.partialright/README.md index 848e1766f..cb84712a9 100644 --- a/lodash.partialright/README.md +++ b/lodash.partialright/README.md @@ -1,4 +1,4 @@ -# lodash.partialright v3.1.0 +# lodash.partialright v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.partialRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var partialRight = require('lodash.partialright'); ``` -See the [documentation](https://lodash.com/docs#partialRight) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.partialright) for more details. +See the [documentation](https://lodash.com/docs#partialRight) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.partialright) for more details. diff --git a/lodash.partialright/index.js b/lodash.partialright/index.js index f56d15c47..f73db77ec 100644 --- a/lodash.partialright/index.js +++ b/lodash.partialright/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -23,7 +23,7 @@ var PARTIAL_RIGHT_FLAG = 64; function createPartial(flag) { var partialFunc = restParam(function(func, partials) { var holders = replaceHolders(partials, partialFunc.placeholder); - return createWrapper(func, flag, null, partials, holders); + return createWrapper(func, flag, undefined, partials, holders); }); return partialFunc; } diff --git a/lodash.partialright/package.json b/lodash.partialright/package.json index 6613dee78..e12b4ae26 100644 --- a/lodash.partialright/package.json +++ b/lodash.partialright/package.json @@ -1,6 +1,6 @@ { "name": "lodash.partialright", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.partialRight` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.partition/README.md b/lodash.partition/README.md index a6ac24ea3..ea6597fc2 100644 --- a/lodash.partition/README.md +++ b/lodash.partition/README.md @@ -1,4 +1,4 @@ -# lodash.partition v3.1.0 +# lodash.partition v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.partition` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var partition = require('lodash.partition'); ``` -See the [documentation](https://lodash.com/docs#partition) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.partition) for more details. +See the [documentation](https://lodash.com/docs#partition) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.partition) for more details. diff --git a/lodash.partition/index.js b/lodash.partition/index.js index cca38f306..64ba381d1 100644 --- a/lodash.partition/index.js +++ b/lodash.partition/index.js @@ -1,13 +1,12 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ -var createAggregator = require('lodash._createaggregator'), - keys = require('lodash.keys'); +var createAggregator = require('lodash._createaggregator'); /** * Creates an array of elements split into two groups, the first of which diff --git a/lodash.partition/package.json b/lodash.partition/package.json index 9ef573db2..b29a6cbf6 100644 --- a/lodash.partition/package.json +++ b/lodash.partition/package.json @@ -1,6 +1,6 @@ { "name": "lodash.partition", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.partition` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.pluck/README.md b/lodash.pluck/README.md index 2ac2ba49d..b7de11bd2 100644 --- a/lodash.pluck/README.md +++ b/lodash.pluck/README.md @@ -1,4 +1,4 @@ -# lodash.pluck v3.1.0 +# lodash.pluck v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.pluck` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var pluck = require('lodash.pluck'); ``` -See the [documentation](https://lodash.com/docs#pluck) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.pluck) for more details. +See the [documentation](https://lodash.com/docs#pluck) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.pluck) for more details. diff --git a/lodash.pluck/index.js b/lodash.pluck/index.js index 922d17311..53772db63 100644 --- a/lodash.pluck/index.js +++ b/lodash.pluck/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -12,7 +12,7 @@ var baseGet = require('lodash._baseget'), map = require('lodash.map'); /** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/, +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** diff --git a/lodash.pluck/package.json b/lodash.pluck/package.json index 412dd0b96..4c26f01ae 100644 --- a/lodash.pluck/package.json +++ b/lodash.pluck/package.json @@ -1,6 +1,6 @@ { "name": "lodash.pluck", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.pluck` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.property/README.md b/lodash.property/README.md index 694b5758c..b46e19762 100644 --- a/lodash.property/README.md +++ b/lodash.property/README.md @@ -1,4 +1,4 @@ -# lodash.property v3.1.0 +# lodash.property v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.property` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var property = require('lodash.property'); ``` -See the [documentation](https://lodash.com/docs#property) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.property) for more details. +See the [documentation](https://lodash.com/docs#property) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.property) for more details. diff --git a/lodash.property/index.js b/lodash.property/index.js index cba9b5a37..12ed530ae 100644 --- a/lodash.property/index.js +++ b/lodash.property/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 @@ var baseGet = require('lodash._baseget'), isArray = require('lodash.isarray'); /** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/, +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** diff --git a/lodash.property/package.json b/lodash.property/package.json index 96c32d079..e0eb0429f 100644 --- a/lodash.property/package.json +++ b/lodash.property/package.json @@ -1,6 +1,6 @@ { "name": "lodash.property", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.property` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.pullat/README.md b/lodash.pullat/README.md index 81352c16e..0a66e6864 100644 --- a/lodash.pullat/README.md +++ b/lodash.pullat/README.md @@ -1,4 +1,4 @@ -# lodash.pullat v3.1.0 +# lodash.pullat v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.pullAt` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var pullAt = require('lodash.pullat'); ``` -See the [documentation](https://lodash.com/docs#pullAt) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.pullat) for more details. +See the [documentation](https://lodash.com/docs#pullAt) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.pullat) for more details. diff --git a/lodash.pullat/index.js b/lodash.pullat/index.js index 95fcdd920..59258d784 100644 --- a/lodash.pullat/index.js +++ b/lodash.pullat/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -23,6 +23,27 @@ var splice = arrayProto.splice; */ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; +/** + * The base implementation of `_.pullAt` without support for individual + * index arguments and capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ +function basePullAt(array, indexes) { + var length = indexes.length; + while (length--) { + var index = parseFloat(indexes[length]); + if (index != previous && isIndex(index)) { + var previous = index; + splice.call(array, index, 1); + } + } + return array; +} + /** * Checks if `value` is a valid array-like index. * @@ -66,17 +87,8 @@ var pullAt = restParam(function(array, indexes) { array || (array = []); indexes = baseFlatten(indexes); - var length = indexes.length, - result = baseAt(array, indexes); - - indexes.sort(baseCompareAscending); - while (length--) { - var index = parseFloat(indexes[length]); - if (index != previous && isIndex(index)) { - var previous = index; - splice.call(array, index, 1); - } - } + var result = baseAt(array, indexes); + basePullAt(array, indexes.sort(baseCompareAscending)); return result; }); diff --git a/lodash.pullat/package.json b/lodash.pullat/package.json index cb0362b0f..3c370a05a 100644 --- a/lodash.pullat/package.json +++ b/lodash.pullat/package.json @@ -1,6 +1,6 @@ { "name": "lodash.pullat", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.pullAt` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.random/README.md b/lodash.random/README.md index 7976dd6de..ce4410fd6 100644 --- a/lodash.random/README.md +++ b/lodash.random/README.md @@ -1,4 +1,4 @@ -# lodash.random v3.1.0 +# lodash.random v3.1.1 The [lodash](https://lodash.com/) method `_.random` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var random = require('lodash.random'); ``` -See the [documentation](https://lodash.com/docs#random) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.random) for more details. +See the [documentation](https://lodash.com/docs#random) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.random) for more details. diff --git a/lodash.random/index.js b/lodash.random/index.js index 64ea7d496..2d230e948 100644 --- a/lodash.random/index.js +++ b/lodash.random/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -30,7 +30,7 @@ var reIsOctal = /^0o[0-7]+$/i; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; -/** Built-in method references without a dependency on `global`. */ +/** Built-in method references without a dependency on `root`. */ var freeParseFloat = parseFloat, freeParseInt = parseInt; @@ -49,7 +49,7 @@ function isIndex(value, length) { } /** 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) @@ -101,7 +101,7 @@ function baseRandom(lower, upper) { var getLength = baseProperty('length'); /** - * Checks if the provided arguments are from an iteratee call. + * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. diff --git a/lodash.random/package.json b/lodash.random/package.json index e913ca525..b8b527743 100644 --- a/lodash.random/package.json +++ b/lodash.random/package.json @@ -1,11 +1,11 @@ { "name": "lodash.random", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.random` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, random", + "keywords": "lodash-modularized, random", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.range/README.md b/lodash.range/README.md index d250feda7..e9122b57c 100644 --- a/lodash.range/README.md +++ b/lodash.range/README.md @@ -1,4 +1,4 @@ -# lodash.range v3.1.0 +# lodash.range v3.1.1 The [lodash](https://lodash.com/) method `_.range` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var range = require('lodash.range'); ``` -See the [documentation](https://lodash.com/docs#range) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.range) for more details. +See the [documentation](https://lodash.com/docs#range) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.range) for more details. diff --git a/lodash.range/index.js b/lodash.range/index.js index cc417f02e..cdc384337 100644 --- a/lodash.range/index.js +++ b/lodash.range/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -30,7 +30,7 @@ var reIsOctal = /^0o[0-7]+$/i; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; -/** Built-in method references without a dependency on `global`. */ +/** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** @@ -48,7 +48,7 @@ function isIndex(value, length) { } /** 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) @@ -135,7 +135,7 @@ function createRange(fromRight) { var getLength = baseProperty('length'); /** - * Checks if the provided arguments are from an iteratee call. + * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. diff --git a/lodash.range/package.json b/lodash.range/package.json index 8c49232b0..27036372a 100644 --- a/lodash.range/package.json +++ b/lodash.range/package.json @@ -1,11 +1,11 @@ { "name": "lodash.range", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.range` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, range", + "keywords": "lodash-modularized, range", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.rearg/LICENSE.txt b/lodash.rearg/LICENSE similarity index 100% rename from lodash.rearg/LICENSE.txt rename to lodash.rearg/LICENSE diff --git a/lodash.rearg/README.md b/lodash.rearg/README.md index efd356cdb..d677ccd26 100644 --- a/lodash.rearg/README.md +++ b/lodash.rearg/README.md @@ -1,4 +1,4 @@ -# lodash.rearg v3.1.0 +# lodash.rearg v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.rearg` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var rearg = require('lodash.rearg'); ``` -See the [documentation](https://lodash.com/docs#rearg) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.rearg) for more details. +See the [documentation](https://lodash.com/docs#rearg) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.rearg) for more details. diff --git a/lodash.rearg/index.js b/lodash.rearg/index.js index c86446d5d..3c4482874 100644 --- a/lodash.rearg/index.js +++ b/lodash.rearg/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -42,7 +42,7 @@ var REARG_FLAG = 256; * // => [3, 6, 9] */ var rearg = restParam(function(func, indexes) { - return createWrapper(func, REARG_FLAG, null, null, null, baseFlatten(indexes)); + return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes)); }); module.exports = rearg; diff --git a/lodash.rearg/package.json b/lodash.rearg/package.json index a90a3b4b5..a38fd6920 100644 --- a/lodash.rearg/package.json +++ b/lodash.rearg/package.json @@ -1,6 +1,6 @@ { "name": "lodash.rearg", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.rearg` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.reduce/README.md b/lodash.reduce/README.md index 1894484d7..f3f505e52 100644 --- a/lodash.reduce/README.md +++ b/lodash.reduce/README.md @@ -1,4 +1,4 @@ -# lodash.reduce v3.1.0 +# lodash.reduce v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.reduce` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var reduce = require('lodash.reduce'); ``` -See the [documentation](https://lodash.com/docs#reduce) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.reduce) for more details. +See the [documentation](https://lodash.com/docs#reduce) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.reduce) for more details. diff --git a/lodash.reduce/index.js b/lodash.reduce/index.js index 311191dbc..09f18f3dd 100644 --- a/lodash.reduce/index.js +++ b/lodash.reduce/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -48,7 +48,7 @@ function arrayReduce(array, iteratee, accumulator, initFromArray) { function createReduce(arrayFunc, eachFunc) { return function(collection, iteratee, accumulator, thisArg) { var initFromArray = arguments.length < 3; - return (typeof iteratee == 'function' && typeof thisArg == 'undefined' && isArray(collection)) + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) ? arrayFunc(collection, iteratee, accumulator, initFromArray) : baseReduce(collection, baseCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); }; @@ -62,7 +62,7 @@ function createReduce(arrayFunc, eachFunc) { * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: * (accumulator, value, index|key, collection). * - * Many lodash methods are guarded to work as interatees for methods like + * Many lodash methods are guarded to work as iteratees for methods like * `_.reduce`, `_.reduceRight`, and `_.transform`. * * The guarded methods are: @@ -79,8 +79,8 @@ function createReduce(arrayFunc, eachFunc) { * @returns {*} Returns the accumulated value. * @example * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; + * _.reduce([1, 2], function(total, n) { + * return total + n; * }); * // => 3 * diff --git a/lodash.reduce/package.json b/lodash.reduce/package.json index 6897819d4..10e8aaf4b 100644 --- a/lodash.reduce/package.json +++ b/lodash.reduce/package.json @@ -1,6 +1,6 @@ { "name": "lodash.reduce", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.reduce` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.reduceright/README.md b/lodash.reduceright/README.md index 65611e40d..7e2f45dc8 100644 --- a/lodash.reduceright/README.md +++ b/lodash.reduceright/README.md @@ -1,4 +1,4 @@ -# lodash.reduceright v3.1.0 +# lodash.reduceright v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.reduceRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var reduceRight = require('lodash.reduceright'); ``` -See the [documentation](https://lodash.com/docs#reduceRight) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.reduceright) for more details. +See the [documentation](https://lodash.com/docs#reduceRight) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.reduceright) for more details. diff --git a/lodash.reduceright/index.js b/lodash.reduceright/index.js index 91eb56089..bd9d31380 100644 --- a/lodash.reduceright/index.js +++ b/lodash.reduceright/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -46,7 +46,7 @@ function arrayReduceRight(array, iteratee, accumulator, initFromArray) { function createReduce(arrayFunc, eachFunc) { return function(collection, iteratee, accumulator, thisArg) { var initFromArray = arguments.length < 3; - return (typeof iteratee == 'function' && typeof thisArg == 'undefined' && isArray(collection)) + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) ? arrayFunc(collection, iteratee, accumulator, initFromArray) : baseReduce(collection, baseCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); }; @@ -74,6 +74,6 @@ function createReduce(arrayFunc, eachFunc) { * }, []); * // => [4, 5, 2, 3, 0, 1] */ -var reduceRight = createReduce(arrayReduceRight, baseEachRight); +var reduceRight = createReduce(arrayReduceRight, baseEachRight); module.exports = reduceRight; diff --git a/lodash.reduceright/package.json b/lodash.reduceright/package.json index 89ecd3d73..5643265ba 100644 --- a/lodash.reduceright/package.json +++ b/lodash.reduceright/package.json @@ -1,6 +1,6 @@ { "name": "lodash.reduceright", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.reduceRight` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.reject/README.md b/lodash.reject/README.md index 5f089325c..48f571578 100644 --- a/lodash.reject/README.md +++ b/lodash.reject/README.md @@ -1,4 +1,4 @@ -# lodash.reject v3.1.0 +# lodash.reject v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.reject` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var reject = require('lodash.reject'); ``` -See the [documentation](https://lodash.com/docs#reject) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.reject) for more details. +See the [documentation](https://lodash.com/docs#reject) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.reject) for more details. diff --git a/lodash.reject/index.js b/lodash.reject/index.js index 3375a02c2..469983457 100644 --- a/lodash.reject/index.js +++ b/lodash.reject/index.js @@ -1,16 +1,15 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ var arrayFilter = require('lodash._arrayfilter'), baseCallback = require('lodash._basecallback'), baseFilter = require('lodash._basefilter'), - isArray = require('lodash.isarray'), - keys = require('lodash.keys'); + isArray = require('lodash.isarray'); /** * The opposite of `_.filter`; this method returns the elements of `collection` diff --git a/lodash.reject/package.json b/lodash.reject/package.json index c9780cb4e..26bc035c0 100644 --- a/lodash.reject/package.json +++ b/lodash.reject/package.json @@ -1,6 +1,6 @@ { "name": "lodash.reject", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.reject` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.repeat/README.md b/lodash.repeat/README.md index a911d9909..134f8303b 100644 --- a/lodash.repeat/README.md +++ b/lodash.repeat/README.md @@ -1,4 +1,4 @@ -# lodash.repeat v3.1.0 +# lodash.repeat v3.1.1 The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var repeat = require('lodash.repeat'); ``` -See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.repeat) for more details. +See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.repeat) for more details. diff --git a/lodash.repeat/index.js b/lodash.repeat/index.js index 85a5a90b3..93745f397 100644 --- a/lodash.repeat/index.js +++ b/lodash.repeat/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -43,14 +43,14 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeFloor = Math.floor; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Checks if `value` is classified as a `Function` object. @@ -100,8 +100,6 @@ function isFunction(value) { * // => 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'); } @@ -257,7 +255,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/lodash.repeat/package.json b/lodash.repeat/package.json index 1ea3bd377..73557a440 100644 --- a/lodash.repeat/package.json +++ b/lodash.repeat/package.json @@ -1,6 +1,6 @@ { "name": "lodash.repeat", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.repeat` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.result/README.md b/lodash.result/README.md index ccba904db..c1ca19f23 100644 --- a/lodash.result/README.md +++ b/lodash.result/README.md @@ -1,4 +1,4 @@ -# lodash.result v3.1.0 +# lodash.result v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.result` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var result = require('lodash.result'); ``` -See the [documentation](https://lodash.com/docs#result) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.result) for more details. +See the [documentation](https://lodash.com/docs#result) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.result) for more details. diff --git a/lodash.result/index.js b/lodash.result/index.js index 45ca74eb0..8b25ce96b 100644 --- a/lodash.result/index.js +++ b/lodash.result/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -13,7 +13,7 @@ var baseGet = require('lodash._baseget'), isFunction = require('lodash.isfunction'); /** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/, +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** diff --git a/lodash.result/package.json b/lodash.result/package.json index 9bd68db00..300a7cea2 100644 --- a/lodash.result/package.json +++ b/lodash.result/package.json @@ -1,6 +1,6 @@ { "name": "lodash.result", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.result` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.snakecase/README.md b/lodash.snakecase/README.md index dc2f673db..a4e456bef 100644 --- a/lodash.snakecase/README.md +++ b/lodash.snakecase/README.md @@ -1,4 +1,4 @@ -# lodash.snakecase v3.1.0 +# lodash.snakecase v3.1.1 The [lodash](https://lodash.com/) method `_.snakeCase` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var snakeCase = require('lodash.snakecase'); ``` -See the [documentation](https://lodash.com/docs#snakeCase) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.snakecase) for more details. +See the [documentation](https://lodash.com/docs#snakeCase) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.snakecase) for more details. diff --git a/lodash.snakecase/index.js b/lodash.snakecase/index.js index 64f6614d4..f88fa2cde 100644 --- a/lodash.snakecase/index.js +++ b/lodash.snakecase/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -17,14 +17,14 @@ var deburr = require('lodash.deburr'), * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. - * @param {boolean} [initFromArray] Specify using the first element of `array` as the initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value. * @returns {*} Returns the accumulated value. */ -function arrayReduce(array, iteratee, accumulator, initFromArray) { +function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array.length; - if (initFromArray && length) { + if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { diff --git a/lodash.snakecase/package.json b/lodash.snakecase/package.json index d7a170b5b..388cd8c5a 100644 --- a/lodash.snakecase/package.json +++ b/lodash.snakecase/package.json @@ -1,6 +1,6 @@ { "name": "lodash.snakecase", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.snakeCase` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.sortby/LICENSE.txt b/lodash.sortby/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.sortby/LICENSE.txt +++ b/lodash.sortby/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.sortby/README.md b/lodash.sortby/README.md index a53d09642..1c5540422 100644 --- a/lodash.sortby/README.md +++ b/lodash.sortby/README.md @@ -1,4 +1,4 @@ -# lodash.sortby v3.1.0 +# lodash.sortby v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.sortBy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var sortBy = require('lodash.sortby'); ``` -See the [documentation](https://lodash.com/docs#sortBy) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.sortby) for more details. +See the [documentation](https://lodash.com/docs#sortBy) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.sortby) for more details. diff --git a/lodash.sortby/index.js b/lodash.sortby/index.js index 351049b07..3699b8400 100644 --- a/lodash.sortby/index.js +++ b/lodash.sortby/index.js @@ -1,8 +1,8 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ @@ -33,6 +33,51 @@ function compareAscending(object, other) { */ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; +/** + * The base implementation of `_.map` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + length = getLength(collection), + result = isLength(length) ? Array(length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +/** + * 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]; + }; +} + +/** + * 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. + * + * @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. * @@ -68,9 +113,8 @@ function isLength(value) { * @memberOf _ * @category Collection * @param {Array|Object|string} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] The function - * invoked per iteration. If a property name or an object is provided it is - * used to create a `_.property` or `_.matches` style callback respectively. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. * @param {*} [thisArg] The `this` binding of `iteratee`. * @returns {Array} Returns the new sorted array. * @example @@ -99,16 +143,14 @@ function sortBy(collection, iteratee, thisArg) { if (collection == null) { return []; } - var index = -1, - length = collection.length, - result = isLength(length) ? Array(length) : []; - if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { iteratee = null; } + var index = -1; iteratee = baseCallback(iteratee, thisArg, 3); - baseEach(collection, function(value, key, collection) { - result[++index] = { 'criteria': iteratee(value, key, collection), 'index': index, 'value': value }; + + var result = baseMap(collection, function(value, key, collection) { + return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; }); return baseSortBy(result, compareAscending); } diff --git a/lodash.sortby/package.json b/lodash.sortby/package.json index 082794ffe..14b44b9d1 100644 --- a/lodash.sortby/package.json +++ b/lodash.sortby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sortby", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.sortBy` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.sortbyall/LICENSE.txt b/lodash.sortbyall/LICENSE.txt index 17764328c..9cd87e5dc 100644 --- a/lodash.sortbyall/LICENSE.txt +++ b/lodash.sortbyall/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.sortbyall/README.md b/lodash.sortbyall/README.md index 5ed99c62a..a24885a3f 100644 --- a/lodash.sortbyall/README.md +++ b/lodash.sortbyall/README.md @@ -1,4 +1,4 @@ -# lodash.sortbyall v3.1.0 +# lodash.sortbyall v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.sortByAll` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var sortByAll = require('lodash.sortbyall'); ``` -See the [documentation](https://lodash.com/docs#sortByAll) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.sortbyall) for more details. +See the [documentation](https://lodash.com/docs#sortByAll) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.sortbyall) for more details. diff --git a/lodash.sortbyall/index.js b/lodash.sortbyall/index.js index 74f59fbb8..8b9ec32c1 100644 --- a/lodash.sortbyall/index.js +++ b/lodash.sortbyall/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.2 @@ -36,17 +36,24 @@ var baseEach = require('lodash._baseeach'), * _.map(_.sortByAll(users, ['user', 'age']), _.values); * // => [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] */ -function sortByAll(collection) { +function sortByAll() { + var args = arguments, + collection = args[0], + guard = args[3], + index = 0, + length = args.length - 1; + if (collection == null) { return []; } - var args = arguments, - guard = args[3]; - - if (guard && isIterateeCall(args[1], args[2], guard)) { - args = [collection, args[1]]; + var props = Array(length); + while (index < length) { + props[index] = args[++index]; } - return baseSortByOrder(collection, baseFlatten(args, false, false, 1), []); + if (guard && isIterateeCall(args[1], args[2], guard)) { + props = args[1]; + } + return baseSortByOrder(collection, baseFlatten(props), []); } module.exports = sortByAll; diff --git a/lodash.sortbyall/package.json b/lodash.sortbyall/package.json index ce3d678f9..99b054723 100644 --- a/lodash.sortbyall/package.json +++ b/lodash.sortbyall/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sortbyall", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.sortByAll` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.sortedindex/README.md b/lodash.sortedindex/README.md index b3dd87767..b1ff26741 100644 --- a/lodash.sortedindex/README.md +++ b/lodash.sortedindex/README.md @@ -1,4 +1,4 @@ -# lodash.sortedindex v3.1.0 +# lodash.sortedindex v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.sortedIndex` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var sortedIndex = require('lodash.sortedindex'); ``` -See the [documentation](https://lodash.com/docs#sortedIndex) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.sortedindex) for more details. +See the [documentation](https://lodash.com/docs#sortedIndex) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.sortedindex) for more details. diff --git a/lodash.sortedindex/index.js b/lodash.sortedindex/index.js index c819a90b5..7ab01fb22 100644 --- a/lodash.sortedindex/index.js +++ b/lodash.sortedindex/index.js @@ -1,15 +1,14 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ var baseCallback = require('lodash._basecallback'), binaryIndex = require('lodash._binaryindex'), - binaryIndexBy = require('lodash._binaryindexby'), - isArray = require('lodash.isarray'); + binaryIndexBy = require('lodash._binaryindexby'); /** * Creates a `_.sortedIndex` or `_.sortedLastIndex` function. @@ -29,7 +28,7 @@ function createSortedIndex(retHighest) { /** * Uses a binary search to determine the lowest index at which `value` should * be inserted into `array` in order to maintain its sort order. If an iteratee - * function is provided it is invoked for `value` and each element of `array` + * function is provided it's invoked for `value` and each element of `array` * to compute their sort ranking. The iteratee is bound to `thisArg` and * invoked with one argument; (value). * diff --git a/lodash.sortedindex/package.json b/lodash.sortedindex/package.json index 315972e7f..32464d391 100644 --- a/lodash.sortedindex/package.json +++ b/lodash.sortedindex/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sortedindex", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.sortedIndex` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.sortedlastindex/README.md b/lodash.sortedlastindex/README.md index 727206580..519078651 100644 --- a/lodash.sortedlastindex/README.md +++ b/lodash.sortedlastindex/README.md @@ -1,4 +1,4 @@ -# lodash.sortedlastindex v3.1.0 +# lodash.sortedlastindex v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.sortedLastIndex` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var sortedLastIndex = require('lodash.sortedlastindex'); ``` -See the [documentation](https://lodash.com/docs#sortedLastIndex) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.sortedlastindex) for more details. +See the [documentation](https://lodash.com/docs#sortedLastIndex) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.sortedlastindex) for more details. diff --git a/lodash.sortedlastindex/index.js b/lodash.sortedlastindex/index.js index 6cdaaa2cc..6a9fd698a 100644 --- a/lodash.sortedlastindex/index.js +++ b/lodash.sortedlastindex/index.js @@ -1,15 +1,14 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ var baseCallback = require('lodash._basecallback'), binaryIndex = require('lodash._binaryindex'), - binaryIndexBy = require('lodash._binaryindexby'), - isArray = require('lodash.isarray'); + binaryIndexBy = require('lodash._binaryindexby'); /** * Creates a `_.sortedIndex` or `_.sortedLastIndex` function. diff --git a/lodash.sortedlastindex/package.json b/lodash.sortedlastindex/package.json index cb03709d3..6310da068 100644 --- a/lodash.sortedlastindex/package.json +++ b/lodash.sortedlastindex/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sortedlastindex", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.sortedLastIndex` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.startswith/README.md b/lodash.startswith/README.md index bc19ab49b..5ff660fb0 100644 --- a/lodash.startswith/README.md +++ b/lodash.startswith/README.md @@ -1,4 +1,4 @@ -# lodash.startswith v3.1.0 +# lodash.startswith v3.1.1 The [lodash](https://lodash.com/) method `_.startsWith` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var startsWith = require('lodash.startswith'); ``` -See the [documentation](https://lodash.com/docs#startsWith) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.startswith) for more details. +See the [documentation](https://lodash.com/docs#startsWith) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.startswith) for more details. diff --git a/lodash.startswith/index.js b/lodash.startswith/index.js index 63f6ecbba..62c23a0e5 100644 --- a/lodash.startswith/index.js +++ b/lodash.startswith/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -42,11 +42,11 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * The base implementation of `_.clamp` which doesn't coerce arguments to numbers. @@ -117,8 +117,6 @@ function isFunction(value) { * // => 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'); } @@ -274,7 +272,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/lodash.startswith/package.json b/lodash.startswith/package.json index 9277bcb82..b9ba817df 100644 --- a/lodash.startswith/package.json +++ b/lodash.startswith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.startswith", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.startsWith` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.takerightwhile/README.md b/lodash.takerightwhile/README.md index d9adb33f4..5178b9536 100644 --- a/lodash.takerightwhile/README.md +++ b/lodash.takerightwhile/README.md @@ -1,4 +1,4 @@ -# lodash.takerightwhile v3.1.0 +# lodash.takerightwhile v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.takeRightWhile` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var takeRightWhile = require('lodash.takerightwhile'); ``` -See the [documentation](https://lodash.com/docs#takeRightWhile) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.takerightwhile) for more details. +See the [documentation](https://lodash.com/docs#takeRightWhile) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.takerightwhile) for more details. diff --git a/lodash.takerightwhile/index.js b/lodash.takerightwhile/index.js index d9b8a8337..f8b4e08bf 100644 --- a/lodash.takerightwhile/index.js +++ b/lodash.takerightwhile/index.js @@ -1,14 +1,13 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ var baseCallback = require('lodash._basecallback'), - baseSlice = require('lodash._baseslice'), - isArray = require('lodash.isarray'); + baseSlice = require('lodash._baseslice'); /** * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, diff --git a/lodash.takerightwhile/package.json b/lodash.takerightwhile/package.json index 4b7d36d90..e69275f48 100644 --- a/lodash.takerightwhile/package.json +++ b/lodash.takerightwhile/package.json @@ -1,6 +1,6 @@ { "name": "lodash.takerightwhile", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.takeRightWhile` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.takewhile/README.md b/lodash.takewhile/README.md index 1827ccabd..3908e1a34 100644 --- a/lodash.takewhile/README.md +++ b/lodash.takewhile/README.md @@ -1,4 +1,4 @@ -# lodash.takewhile v3.1.0 +# lodash.takewhile v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.takeWhile` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var takeWhile = require('lodash.takewhile'); ``` -See the [documentation](https://lodash.com/docs#takeWhile) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.takewhile) for more details. +See the [documentation](https://lodash.com/docs#takeWhile) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.takewhile) for more details. diff --git a/lodash.takewhile/index.js b/lodash.takewhile/index.js index d5891c633..027df4f7e 100644 --- a/lodash.takewhile/index.js +++ b/lodash.takewhile/index.js @@ -1,14 +1,13 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ var baseCallback = require('lodash._basecallback'), - baseSlice = require('lodash._baseslice'), - isArray = require('lodash.isarray'); + baseSlice = require('lodash._baseslice'); /** * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, diff --git a/lodash.takewhile/package.json b/lodash.takewhile/package.json index 0f1929e38..4ccbead62 100644 --- a/lodash.takewhile/package.json +++ b/lodash.takewhile/package.json @@ -1,6 +1,6 @@ { "name": "lodash.takewhile", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.takeWhile` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.templatesettings/LICENSE.txt b/lodash.templatesettings/LICENSE similarity index 89% rename from lodash.templatesettings/LICENSE.txt rename to lodash.templatesettings/LICENSE index 17764328c..b054ca5a3 100644 --- a/lodash.templatesettings/LICENSE.txt +++ b/lodash.templatesettings/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.templatesettings/README.md b/lodash.templatesettings/README.md index 85ed09084..0ca2657c7 100644 --- a/lodash.templatesettings/README.md +++ b/lodash.templatesettings/README.md @@ -1,20 +1,18 @@ -# lodash.templatesettings v3.1.0 +# lodash.templatesettings v3.1.1 -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.templateSettings` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. +The [lodash](https://lodash.com/) method `_.templateSettings` exported as a [Node.js](https://nodejs.org/) module. ## Installation Using npm: - ```bash $ {sudo -H} npm i -g npm $ npm i --save lodash.templatesettings ``` -In Node.js/io.js: - +In Node.js: ```js var templateSettings = require('lodash.templatesettings'); ``` -See the [documentation](https://lodash.com/docs#templateSettings) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.templatesettings) for more details. +See the [documentation](https://lodash.com/docs#templateSettings) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.templatesettings) for more details. diff --git a/lodash.templatesettings/index.js b/lodash.templatesettings/index.js index 21aad3867..0960d5a0a 100644 --- a/lodash.templatesettings/index.js +++ b/lodash.templatesettings/index.js @@ -1,13 +1,13 @@ /** - * lodash 3.1.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * lodash 3.1.1 (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 */ -var reInterpolate = require('lodash._reinterpolate'), - escape = require('lodash.escape'); +var escape = require('lodash.escape'), + reInterpolate = require('lodash._reinterpolate'); /** Used to match template delimiters. */ var reEscape = /<%-([\s\S]+?)%>/g, diff --git a/lodash.templatesettings/package.json b/lodash.templatesettings/package.json index 7f91b3427..150361dfe 100644 --- a/lodash.templatesettings/package.json +++ b/lodash.templatesettings/package.json @@ -1,17 +1,15 @@ { "name": "lodash.templatesettings", - "version": "3.1.0", - "description": "The modern build of lodash’s `_.templateSettings` as a module.", + "version": "3.1.1", + "description": "The lodash method `_.templateSettings` 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, templatesettings", "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.trim/README.md b/lodash.trim/README.md index 238789359..202323008 100644 --- a/lodash.trim/README.md +++ b/lodash.trim/README.md @@ -1,4 +1,4 @@ -# lodash.trim v3.1.0 +# lodash.trim v3.1.1 The [lodash](https://lodash.com/) method `_.trim` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var trim = require('lodash.trim'); ``` -See the [documentation](https://lodash.com/docs#trim) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.trim) for more details. +See the [documentation](https://lodash.com/docs#trim) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.trim) for more details. diff --git a/lodash.trim/index.js b/lodash.trim/index.js index d144988a0..0820c4407 100644 --- a/lodash.trim/index.js +++ b/lodash.trim/index.js @@ -1,156 +1,17 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (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 */ -var charsEndIndex = require('lodash._charsendindex'), - charsStartIndex = require('lodash._charsstartindex'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsModifier = '(?:\\ud83c[\\udffb-\\udfff])', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reComplexSymbol = RegExp(rsSymbol + rsSeq, 'g'); - -/** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function stringToArray(string) { - return string.match(reComplexSymbol); -} - -/** 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 objectToString = objectProto.toString; - -/** Built-in value references. */ -var _Symbol = global.Symbol; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; - -/** - * 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 `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} +var baseToString = require('lodash._basetostring'), + charsLeftIndex = require('lodash._charsleftindex'), + charsRightIndex = require('lodash._charsrightindex'), + isIterateeCall = require('lodash._isiterateecall'), + trimmedLeftIndex = require('lodash._trimmedleftindex'), + trimmedRightIndex = require('lodash._trimmedrightindex'); /** * Removes leading and trailing whitespace or specified characters from `string`. @@ -160,7 +21,7 @@ function toString(value) { * @category String * @param {string} [string=''] The string to trim. * @param {string} [chars=whitespace] The characters to trim. - * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. * @returns {string} Returns the trimmed string. * @example * @@ -174,21 +35,16 @@ function toString(value) { * // => ['foo', 'bar'] */ function trim(string, chars, guard) { - string = toString(string); + var value = string; + string = baseToString(string); if (!string) { return string; } - if (guard || chars === undefined) { - return string.replace(reTrim, ''); + if (guard ? isIterateeCall(value, chars, guard) : chars == null) { + return string.slice(trimmedLeftIndex(string), trimmedRightIndex(string) + 1); } chars = (chars + ''); - if (!chars) { - return string; - } - var strSymbols = stringToArray(string), - chrSymbols = stringToArray(chars); - - return strSymbols.slice(charsStartIndex(strSymbols, chrSymbols), charsEndIndex(strSymbols, chrSymbols) + 1).join(''); + return string.slice(charsLeftIndex(string, chars), charsRightIndex(string, chars) + 1); } module.exports = trim; diff --git a/lodash.trim/package.json b/lodash.trim/package.json index cda140e29..72619c74d 100644 --- a/lodash.trim/package.json +++ b/lodash.trim/package.json @@ -1,6 +1,6 @@ { "name": "lodash.trim", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.trim` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -15,7 +15,11 @@ "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._charsendindex": "^3.0.0", - "lodash._charsstartindex": "^3.0.0" + "lodash._basetostring": "^3.0.0", + "lodash._charsleftindex": "^3.0.0", + "lodash._charsrightindex": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._trimmedleftindex": "^3.0.0", + "lodash._trimmedrightindex": "^3.0.0" } } diff --git a/lodash.unescape/README.md b/lodash.unescape/README.md index 5d1e1da83..7f75a645f 100644 --- a/lodash.unescape/README.md +++ b/lodash.unescape/README.md @@ -1,4 +1,4 @@ -# lodash.unescape v3.1.0 +# lodash.unescape v3.1.1 The [lodash](https://lodash.com/) method `_.unescape` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var unescape = require('lodash.unescape'); ``` -See the [documentation](https://lodash.com/docs#unescape) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.unescape) for more details. +See the [documentation](https://lodash.com/docs#unescape) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.unescape) for more details. diff --git a/lodash.unescape/index.js b/lodash.unescape/index.js index 4d976b195..a2e809633 100644 --- a/lodash.unescape/index.js +++ b/lodash.unescape/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -48,11 +48,11 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Checks if `value` is object-like. A value is object-like if it's not `null` @@ -131,7 +131,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/lodash.unescape/package.json b/lodash.unescape/package.json index e694480a8..5caace7cb 100644 --- a/lodash.unescape/package.json +++ b/lodash.unescape/package.json @@ -1,6 +1,6 @@ { "name": "lodash.unescape", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.unescape` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.uniqueid/README.md b/lodash.uniqueid/README.md index 12abfb1e2..eb0320d1e 100644 --- a/lodash.uniqueid/README.md +++ b/lodash.uniqueid/README.md @@ -1,4 +1,4 @@ -# lodash.uniqueid v3.1.0 +# lodash.uniqueid v3.1.1 The [lodash](https://lodash.com/) method `_.uniqueId` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var uniqueId = require('lodash.uniqueid'); ``` -See the [documentation](https://lodash.com/docs#uniqueId) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.uniqueid) for more details. +See the [documentation](https://lodash.com/docs#uniqueId) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.uniqueid) for more details. diff --git a/lodash.uniqueid/index.js b/lodash.uniqueid/index.js index 4a4fc5840..69d663672 100644 --- a/lodash.uniqueid/index.js +++ b/lodash.uniqueid/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -26,11 +26,11 @@ var idCounter = 0; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Checks if `value` is object-like. A value is object-like if it's not `null` @@ -109,7 +109,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/lodash.uniqueid/package.json b/lodash.uniqueid/package.json index a5bacd171..67515833c 100644 --- a/lodash.uniqueid/package.json +++ b/lodash.uniqueid/package.json @@ -1,6 +1,6 @@ { "name": "lodash.uniqueid", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.uniqueId` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.words/README.md b/lodash.words/README.md index 9c9ff9f71..20e752911 100644 --- a/lodash.words/README.md +++ b/lodash.words/README.md @@ -1,4 +1,4 @@ -# lodash.words v3.1.0 +# lodash.words v3.1.1 The [lodash](https://lodash.com/) method `_.words` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var words = require('lodash.words'); ``` -See the [documentation](https://lodash.com/docs#words) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.words) for more details. +See the [documentation](https://lodash.com/docs#words) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.words) for more details. diff --git a/lodash.words/index.js b/lodash.words/index.js index 372f26136..86f23f98a 100644 --- a/lodash.words/index.js +++ b/lodash.words/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -15,6 +15,8 @@ var symbolTag = '[object Symbol]'; /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', + rsComboSymbolsRange = '\\u20d0-\\u20f0', rsDingbatRange = '\\u2700-\\u27bf', rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', @@ -27,11 +29,13 @@ var rsAstralRange = '\\ud800-\\udfff', /** Used to compose unicode capture groups. */ var rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', rsDigits = '\\d+', rsDingbat = '[' + rsDingbatRange + ']', rsLower = '[' + rsLowerRange + ']', rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsModifier = '(?:\\ud83c[\\udffb-\\udfff])', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', @@ -55,7 +59,8 @@ var reComplexWord = RegExp([ rsUpper + '?' + rsLower + '+(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', rsUpperMisc + '+(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', rsUpper + '?' + rsLowerMisc + '+', - rsDigits + '(?:' + rsLowerMisc + '+)?', + rsUpper + '+', + rsDigits, rsEmoji ].join('|'), 'g'); @@ -72,11 +77,11 @@ var objectProto = global.Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var _Symbol = global.Symbol; +var Symbol = global.Symbol; /** Used to convert symbols to primitives and strings. */ -var symbolProto = _Symbol ? _Symbol.prototype : undefined, - symbolToString = _Symbol ? symbolProto.toString : undefined; +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; /** * Checks if `value` is object-like. A value is object-like if it's not `null` @@ -155,7 +160,7 @@ function toString(value) { return ''; } if (isSymbol(value)) { - return _Symbol ? symbolToString.call(value) : ''; + return Symbol ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; diff --git a/lodash.words/package.json b/lodash.words/package.json index c4d356dee..d3c8dd1e4 100644 --- a/lodash.words/package.json +++ b/lodash.words/package.json @@ -1,6 +1,6 @@ { "name": "lodash.words", - "version": "3.1.0", + "version": "3.1.1", "description": "The lodash method `_.words` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.xor/README.md b/lodash.xor/README.md index 83d583e91..1534ebbb7 100644 --- a/lodash.xor/README.md +++ b/lodash.xor/README.md @@ -1,4 +1,4 @@ -# lodash.xor v3.1.0 +# lodash.xor v3.1.1 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.xor` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var xor = require('lodash.xor'); ``` -See the [documentation](https://lodash.com/docs#xor) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.xor) for more details. +See the [documentation](https://lodash.com/docs#xor) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.xor) for more details. diff --git a/lodash.xor/index.js b/lodash.xor/index.js index 04eda23ee..e9d5f8cc6 100644 --- a/lodash.xor/index.js +++ b/lodash.xor/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.1.0 (Custom Build) + * lodash 3.1.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -13,7 +13,7 @@ var baseDifference = require('lodash._basedifference'), * 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. @@ -65,7 +65,7 @@ function isLength(value) { } /** - * Creates an array that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) * of the provided arrays. * * @static diff --git a/lodash.xor/package.json b/lodash.xor/package.json index 8689cd49e..e62c4a7d5 100644 --- a/lodash.xor/package.json +++ b/lodash.xor/package.json @@ -1,6 +1,6 @@ { "name": "lodash.xor", - "version": "3.1.0", + "version": "3.1.1", "description": "The modern build of lodash’s `_.xor` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg",