From ad40188e5b607905f7ed23c57433f86e080f01b7 Mon Sep 17 00:00:00 2001 From: jdalton Date: Tue, 19 May 2015 07:27:29 -0700 Subject: [PATCH] Bump to v3.0.8. --- README.md | 2 +- lodash._isiterateecall/README.md | 4 +- lodash._isiterateecall/index.js | 8 ++-- lodash._isiterateecall/package.json | 2 +- lodash.isarguments/README.md | 4 +- lodash.isarguments/index.js | 46 +++++++++++++------- lodash.isarguments/package.json | 4 +- lodash.isboolean/index.js | 2 +- lodash.iselement/{LICENSE.txt => LICENSE} | 0 lodash.iselement/README.md | 4 +- lodash.iselement/index.js | 53 +---------------------- lodash.iselement/package.json | 2 +- lodash.isfunction/README.md | 4 +- lodash.isfunction/index.js | 19 ++++---- lodash.isfunction/package.json | 4 +- lodash.isnumber/index.js | 2 +- lodash.keysin/README.md | 4 +- lodash.keysin/index.js | 11 +++-- lodash.keysin/package.json | 2 +- 19 files changed, 74 insertions(+), 103 deletions(-) rename lodash.iselement/{LICENSE.txt => LICENSE} (100%) diff --git a/README.md b/README.md index 45def0db8..1dd72f7b8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v3.0.7 +# lodash v3.0.8 The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. diff --git a/lodash._isiterateecall/README.md b/lodash._isiterateecall/README.md index 1ba7ffb45..41c9dddff 100644 --- a/lodash._isiterateecall/README.md +++ b/lodash._isiterateecall/README.md @@ -1,4 +1,4 @@ -# lodash._isiterateecall v3.0.7 +# lodash._isiterateecall v3.0.8 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isIterateeCall = require('lodash._isiterateecall'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.0.7-npm-packages/lodash._isiterateecall) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.0.8-npm-packages/lodash._isiterateecall) for more details. diff --git a/lodash._isiterateecall/index.js b/lodash._isiterateecall/index.js index 91e644f85..e54c1c069 100644 --- a/lodash._isiterateecall/index.js +++ b/lodash._isiterateecall/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.7 (Custom Build) + * lodash 3.0.8 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -11,7 +11,7 @@ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) * of an array-like value. */ -var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; +var MAX_SAFE_INTEGER = 9007199254740991; /** * The base implementation of `_.property` without support for deep paths. @@ -58,7 +58,7 @@ function isArrayLike(value) { * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { - value = +value; + value = typeof value == 'number' ? value : parseFloat(value); length = length == null ? MAX_SAFE_INTEGER : length; return value > -1 && value % 1 == 0 && value < length; } @@ -123,7 +123,7 @@ function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; - return type == 'function' || (!!value && type == 'object'); + return !!value && (type == 'object' || type == 'function'); } module.exports = isIterateeCall; diff --git a/lodash._isiterateecall/package.json b/lodash._isiterateecall/package.json index 6c6eb2ba6..3ac36422c 100644 --- a/lodash._isiterateecall/package.json +++ b/lodash._isiterateecall/package.json @@ -1,6 +1,6 @@ { "name": "lodash._isiterateecall", - "version": "3.0.7", + "version": "3.0.8", "description": "The modern build of lodash’s internal `isIterateeCall` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isarguments/README.md b/lodash.isarguments/README.md index d98991b21..32ac76131 100644 --- a/lodash.isarguments/README.md +++ b/lodash.isarguments/README.md @@ -1,4 +1,4 @@ -# lodash.isarguments v3.0.7 +# lodash.isarguments v3.0.8 The [lodash](https://lodash.com/) method `_.isArguments` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isArguments = require('lodash.isarguments'); ``` -See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.0.7-npm-packages/lodash.isarguments) for more details. +See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.0.8-npm-packages/lodash.isarguments) for more details. diff --git a/lodash.isarguments/index.js b/lodash.isarguments/index.js index c9684d346..ee8cd5c4b 100644 --- a/lodash.isarguments/index.js +++ b/lodash.isarguments/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.7 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -22,7 +22,8 @@ var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -35,7 +36,7 @@ var propertyIsEnumerable = objectProto.propertyIsEnumerable; * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { @@ -46,8 +47,9 @@ function baseProperty(key) { /** * Gets the "length" property value of `object`. * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. + * **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. @@ -60,9 +62,11 @@ var getLength = baseProperty('length'); * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isArguments(function() { return arguments; }()); @@ -84,6 +88,7 @@ function isArguments(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. @@ -102,8 +107,7 @@ function isArguments(value) { * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -112,9 +116,11 @@ function isArrayLike(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); @@ -138,9 +144,11 @@ function isArrayLikeObject(value) { * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isFunction(_); @@ -151,8 +159,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } @@ -160,13 +168,16 @@ function isFunction(value) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This function is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, + * else `false`. * @example * * _.isLength(3); @@ -187,11 +198,13 @@ function isLength(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('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. @@ -220,6 +233,7 @@ function isObject(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.isarguments/package.json b/lodash.isarguments/package.json index 873ebc6a0..20a5487ac 100644 --- a/lodash.isarguments/package.json +++ b/lodash.isarguments/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isarguments", - "version": "3.0.7", + "version": "3.0.8", "description": "The lodash method `_.isArguments` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.isboolean/index.js b/lodash.isboolean/index.js index 185921bf2..19ee2c450 100644 --- a/lodash.isboolean/index.js +++ b/lodash.isboolean/index.js @@ -15,7 +15,7 @@ var objectProto = Object.prototype; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; diff --git a/lodash.iselement/LICENSE.txt b/lodash.iselement/LICENSE similarity index 100% rename from lodash.iselement/LICENSE.txt rename to lodash.iselement/LICENSE diff --git a/lodash.iselement/README.md b/lodash.iselement/README.md index c70f909e7..95020a7ad 100644 --- a/lodash.iselement/README.md +++ b/lodash.iselement/README.md @@ -1,4 +1,4 @@ -# lodash.iselement v3.0.7 +# lodash.iselement v3.0.8 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isElement` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var isElement = require('lodash.iselement'); ``` -See the [documentation](https://lodash.com/docs#isElement) or [package source](https://github.com/lodash/lodash/blob/3.0.7-npm-packages/lodash.iselement) for more details. +See the [documentation](https://lodash.com/docs#isElement) or [package source](https://github.com/lodash/lodash/blob/3.0.8-npm-packages/lodash.iselement) for more details. diff --git a/lodash.iselement/index.js b/lodash.iselement/index.js index 18940a3f5..e19e8a0ed 100644 --- a/lodash.iselement/index.js +++ b/lodash.iselement/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.7 (Custom Build) + * lodash 3.0.8 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -19,48 +19,6 @@ function isObjectLike(value) { return !!value && typeof value == 'object'; } -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to detect DOM support. */ -var document = (document = global.window) ? document.document : null; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * An object environment feature flags. - * - * @static - * @memberOf _ - * @type Object - */ -var support = {}; - -(function(x) { - var Ctor = function() { this.x = x; }, - object = { '0': x, 'length': x }, - props = []; - - Ctor.prototype = { 'valueOf': x, 'y': x }; - for (var key in new Ctor) { props.push(key); } - - /** - * Detect if the DOM is supported. - * - * @memberOf _.support - * @type boolean - */ - try { - support.dom = document.createDocumentFragment().nodeType === 11; - } catch(e) { - support.dom = false; - } -}(1, 0)); - /** * Checks if `value` is a DOM element. * @@ -78,14 +36,7 @@ var support = {}; * // => false */ function isElement(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && - (objToString.call(value).indexOf('Element') > -1); -} -// Fallback for environments without DOM support. -if (!support.dom) { - isElement = function(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); - }; + return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); } module.exports = isElement; diff --git a/lodash.iselement/package.json b/lodash.iselement/package.json index e39b59f8b..1b768e88d 100644 --- a/lodash.iselement/package.json +++ b/lodash.iselement/package.json @@ -1,6 +1,6 @@ { "name": "lodash.iselement", - "version": "3.0.7", + "version": "3.0.8", "description": "The modern build of lodash’s `_.isElement` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.isfunction/README.md b/lodash.isfunction/README.md index 01d3a3e62..a2b1a96e5 100644 --- a/lodash.isfunction/README.md +++ b/lodash.isfunction/README.md @@ -1,4 +1,4 @@ -# lodash.isfunction v3.0.7 +# lodash.isfunction v3.0.8 The [lodash](https://lodash.com/) method `_.isFunction` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isFunction = require('lodash.isfunction'); ``` -See the [documentation](https://lodash.com/docs#isFunction) or [package source](https://github.com/lodash/lodash/blob/3.0.7-npm-packages/lodash.isfunction) for more details. +See the [documentation](https://lodash.com/docs#isFunction) or [package source](https://github.com/lodash/lodash/blob/3.0.8-npm-packages/lodash.isfunction) for more details. diff --git a/lodash.isfunction/index.js b/lodash.isfunction/index.js index 2c4278219..f3f54b054 100644 --- a/lodash.isfunction/index.js +++ b/lodash.isfunction/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.7 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -12,10 +12,11 @@ var funcTag = '[object Function]', genTag = '[object GeneratorFunction]'; /** Used for built-in method references. */ -var objectProto = global.Object.prototype; +var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -25,9 +26,10 @@ var objectToString = objectProto.toString; * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -38,18 +40,19 @@ var objectToString = objectProto.toString; */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** - * 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('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. diff --git a/lodash.isfunction/package.json b/lodash.isfunction/package.json index 2d3943001..ef6eed008 100644 --- a/lodash.isfunction/package.json +++ b/lodash.isfunction/package.json @@ -1,11 +1,11 @@ { "name": "lodash.isfunction", - "version": "3.0.7", + "version": "3.0.8", "description": "The lodash method `_.isFunction` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", "license": "MIT", - "keywords": "lodash, lodash-modularized, stdlib, util, isfunction", + "keywords": "lodash-modularized, isfunction", "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", diff --git a/lodash.isnumber/index.js b/lodash.isnumber/index.js index 3a6f7afbd..a62120733 100644 --- a/lodash.isnumber/index.js +++ b/lodash.isnumber/index.js @@ -15,7 +15,7 @@ var objectProto = Object.prototype; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; diff --git a/lodash.keysin/README.md b/lodash.keysin/README.md index e55e832a4..1ff19c8fa 100644 --- a/lodash.keysin/README.md +++ b/lodash.keysin/README.md @@ -1,4 +1,4 @@ -# lodash.keysin v3.0.7 +# lodash.keysin v3.0.8 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keysIn` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var keysIn = require('lodash.keysin'); ``` -See the [documentation](https://lodash.com/docs#keysIn) or [package source](https://github.com/lodash/lodash/blob/3.0.7-npm-packages/lodash.keysin) for more details. +See the [documentation](https://lodash.com/docs#keysIn) or [package source](https://github.com/lodash/lodash/blob/3.0.8-npm-packages/lodash.keysin) for more details. diff --git a/lodash.keysin/index.js b/lodash.keysin/index.js index a21209b53..7df7e2bc3 100644 --- a/lodash.keysin/index.js +++ b/lodash.keysin/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.0.7 (Custom Build) + * lodash 3.0.8 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -9,6 +9,9 @@ var 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; @@ -16,7 +19,7 @@ var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; /** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -30,7 +33,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; * @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; } @@ -38,7 +41,7 @@ function isIndex(value, length) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * * @private * @param {*} value The value to check. diff --git a/lodash.keysin/package.json b/lodash.keysin/package.json index 1e945a159..07afb7d94 100644 --- a/lodash.keysin/package.json +++ b/lodash.keysin/package.json @@ -1,6 +1,6 @@ { "name": "lodash.keysin", - "version": "3.0.7", + "version": "3.0.8", "description": "The modern build of lodash’s `_.keysIn` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg",