Compare commits

...

3 Commits

Author SHA1 Message Date
John-David Dalton
8c168dd1b8 Bump to v3.3.7. 2018-02-03 19:13:30 -08:00
John-David Dalton
2f9ad20a7f Bump to v3.3.6. 2018-02-03 19:13:30 -08:00
John-David Dalton
fbdd63d3ad Bump to v3.3.5. 2018-02-03 19:13:30 -08:00
7 changed files with 127 additions and 89 deletions

View File

@@ -1,4 +1,4 @@
# lodash v3.3.4 # lodash v3.3.7
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.

View File

@@ -1,4 +1,4 @@
# lodash.fill v3.3.4 # lodash.fill v3.3.7
The [lodash](https://lodash.com/) method `_.fill` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.fill` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var fill = require('lodash.fill'); var fill = require('lodash.fill');
``` ```
See the [documentation](https://lodash.com/docs#fill) or [package source](https://github.com/lodash/lodash/blob/3.3.4-npm-packages/lodash.fill) for more details. See the [documentation](https://lodash.com/docs#fill) or [package source](https://github.com/lodash/lodash/blob/3.3.7-npm-packages/lodash.fill) for more details.

View File

@@ -1,5 +1,5 @@
/** /**
* lodash 3.3.4 (Custom Build) <https://lodash.com/> * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
@@ -40,17 +40,16 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
var freeParseInt = parseInt; var freeParseInt = parseInt;
/** /**
* Checks if `value` is a valid array-like index. * The base implementation of `_.property` without support for deep paths.
* *
* @private * @private
* @param {*} value The value to check. * @param {string} key The key of the property to get.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {Function} Returns the new accessor function.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/ */
function isIndex(value, length) { function baseProperty(key) {
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; return function(object) {
length = length == null ? MAX_SAFE_INTEGER : length; return object == null ? undefined : object[key];
return value > -1 && value % 1 == 0 && value < length; };
} }
/** Used for built-in method references. */ /** Used for built-in method references. */
@@ -64,7 +63,7 @@ var objectProto = Object.prototype;
var objectToString = objectProto.toString; var objectToString = objectProto.toString;
/** /**
* The base implementation of `_.clamp` which doesn't coerce arguments to numbers. * The base implementation of `_.clamp` which doesn't coerce arguments.
* *
* @private * @private
* @param {number} number The number to clamp. * @param {number} number The number to clamp.
@@ -112,19 +111,6 @@ function baseFill(array, value, start, end) {
return array; return array;
} }
/**
* 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`. * Gets the "length" property value of `object`.
* *
@@ -138,6 +124,21 @@ function baseProperty(key) {
*/ */
var getLength = baseProperty('length'); var getLength = baseProperty('length');
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(typeof value == 'number' || reIsUint.test(value)) &&
(value > -1 && value % 1 == 0 && value < length);
}
/** /**
* Checks if the given arguments are from an iteratee call. * Checks if the given arguments are from an iteratee call.
* *
@@ -217,8 +218,8 @@ function fill(array, value, start, end) {
* @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example * @example
* *
* var object = { 'user': 'fred' }; * var object = { 'a': 1 };
* var other = { 'user': 'fred' }; * var other = { 'a': 1 };
* *
* _.eq(object, object); * _.eq(object, object);
* // => true * // => true
@@ -276,8 +277,7 @@ function isArrayLike(value) {
* @since 0.1.0 * @since 0.1.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, * @returns {boolean} Returns `true` if `value` is a function, else `false`.
* else `false`.
* @example * @example
* *
* _.isFunction(_); * _.isFunction(_);
@@ -392,8 +392,7 @@ function isObjectLike(value) {
* @since 4.0.0 * @since 4.0.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* else `false`.
* @example * @example
* *
* _.isSymbol(Symbol.iterator); * _.isSymbol(Symbol.iterator);
@@ -407,10 +406,45 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag); (isObjectLike(value) && objectToString.call(value) == symbolTag);
} }
/**
* Converts `value` to a finite number.
*
* @static
* @memberOf _
* @since 4.12.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted number.
* @example
*
* _.toFinite(3.2);
* // => 3.2
*
* _.toFinite(Number.MIN_VALUE);
* // => 5e-324
*
* _.toFinite(Infinity);
* // => 1.7976931348623157e+308
*
* _.toFinite('3.2');
* // => 3.2
*/
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
/** /**
* Converts `value` to an integer. * Converts `value` to an integer.
* *
* **Note:** This function is loosely based on * **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
* *
* @static * @static
@@ -421,7 +455,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer. * @returns {number} Returns the converted integer.
* @example * @example
* *
* _.toInteger(3); * _.toInteger(3.2);
* // => 3 * // => 3
* *
* _.toInteger(Number.MIN_VALUE); * _.toInteger(Number.MIN_VALUE);
@@ -430,20 +464,14 @@ function isSymbol(value) {
* _.toInteger(Infinity); * _.toInteger(Infinity);
* // => 1.7976931348623157e+308 * // => 1.7976931348623157e+308
* *
* _.toInteger('3'); * _.toInteger('3.2');
* // => 3 * // => 3
*/ */
function toInteger(value) { function toInteger(value) {
if (!value) { var result = toFinite(value),
return value === 0 ? value : 0; remainder = result % 1;
}
value = toNumber(value); return result === result ? (remainder ? result - remainder : result) : 0;
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
var remainder = value % 1;
return value === value ? (remainder ? value - remainder : value) : 0;
} }
/** /**
@@ -461,7 +489,7 @@ function toInteger(value) {
* @returns {number} Returns the converted integer. * @returns {number} Returns the converted integer.
* @example * @example
* *
* _.toLength(3); * _.toLength(3.2);
* // => 3 * // => 3
* *
* _.toLength(Number.MIN_VALUE); * _.toLength(Number.MIN_VALUE);
@@ -470,7 +498,7 @@ function toInteger(value) {
* _.toLength(Infinity); * _.toLength(Infinity);
* // => 4294967295 * // => 4294967295
* *
* _.toLength('3'); * _.toLength('3.2');
* // => 3 * // => 3
*/ */
function toLength(value) { function toLength(value) {
@@ -488,8 +516,8 @@ function toLength(value) {
* @returns {number} Returns the number. * @returns {number} Returns the number.
* @example * @example
* *
* _.toNumber(3); * _.toNumber(3.2);
* // => 3 * // => 3.2
* *
* _.toNumber(Number.MIN_VALUE); * _.toNumber(Number.MIN_VALUE);
* // => 5e-324 * // => 5e-324
@@ -497,8 +525,8 @@ function toLength(value) {
* _.toNumber(Infinity); * _.toNumber(Infinity);
* // => Infinity * // => Infinity
* *
* _.toNumber('3'); * _.toNumber('3.2');
* // => 3 * // => 3.2
*/ */
function toNumber(value) { function toNumber(value) {
if (typeof value == 'number') { if (typeof value == 'number') {

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.fill", "name": "lodash.fill",
"version": "3.3.4", "version": "3.3.7",
"description": "The lodash method `_.fill` exported as a module.", "description": "The lodash method `_.fill` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",

View File

@@ -1,4 +1,4 @@
# lodash.inrange v3.3.4 # lodash.inrange v3.3.6
The [lodash](https://lodash.com/) method `_.inRange` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.inRange` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var inRange = require('lodash.inrange'); var inRange = require('lodash.inrange');
``` ```
See the [documentation](https://lodash.com/docs#inRange) or [package source](https://github.com/lodash/lodash/blob/3.3.4-npm-packages/lodash.inrange) for more details. See the [documentation](https://lodash.com/docs#inRange) or [package source](https://github.com/lodash/lodash/blob/3.3.6-npm-packages/lodash.inrange) for more details.

View File

@@ -8,12 +8,12 @@
*/ */
/** Used as references for various `Number` constants. */ /** Used as references for various `Number` constants. */
var NAN = 0 / 0; var INFINITY = 1 / 0,
MAX_INTEGER = 1.7976931348623157e+308,
NAN = 0 / 0;
/** `Object#toString` result references. */ /** `Object#toString` result references. */
var funcTag = '[object Function]', var symbolTag = '[object Symbol]';
genTag = '[object GeneratorFunction]',
symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */ /** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g; var reTrim = /^\s+|\s+$/g;
@@ -35,7 +35,7 @@ var objectProto = Object.prototype;
/** /**
* Used to resolve the * 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. * of values.
*/ */
var objectToString = objectProto.toString; var objectToString = objectProto.toString;
@@ -57,34 +57,9 @@ function baseInRange(number, start, end) {
return number >= nativeMin(start, end) && number < nativeMax(start, end); return number >= nativeMin(start, end) && number < nativeMax(start, end);
} }
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
// 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;
}
/** /**
* Checks if `value` is the * Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) * [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('')`) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static
@@ -162,6 +137,41 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag); (isObjectLike(value) && objectToString.call(value) == symbolTag);
} }
/**
* Converts `value` to a finite number.
*
* @static
* @memberOf _
* @since 4.12.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted number.
* @example
*
* _.toFinite(3.2);
* // => 3.2
*
* _.toFinite(Number.MIN_VALUE);
* // => 5e-324
*
* _.toFinite(Infinity);
* // => 1.7976931348623157e+308
*
* _.toFinite('3.2');
* // => 3.2
*/
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
/** /**
* Converts `value` to a number. * Converts `value` to a number.
* *
@@ -193,7 +203,7 @@ function toNumber(value) {
return NAN; return NAN;
} }
if (isObject(value)) { if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value; var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other; value = isObject(other) ? (other + '') : other;
} }
if (typeof value != 'string') { if (typeof value != 'string') {
@@ -245,12 +255,12 @@ function toNumber(value) {
* // => true * // => true
*/ */
function inRange(number, start, end) { function inRange(number, start, end) {
start = toNumber(start) || 0; start = toFinite(start);
if (end === undefined) { if (end === undefined) {
end = start; end = start;
start = 0; start = 0;
} else { } else {
end = toNumber(end) || 0; end = toFinite(end);
} }
number = toNumber(number); number = toNumber(number);
return baseInRange(number, start, end); return baseInRange(number, start, end);

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.inrange", "name": "lodash.inrange",
"version": "3.3.4", "version": "3.3.6",
"description": "The lodash method `_.inRange` exported as a module.", "description": "The lodash method `_.inRange` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",