Bump to v4.9.0.

This commit is contained in:
John-David Dalton
2016-05-12 00:41:46 -07:00
parent dc5c8eda06
commit 4210ceea4b
20 changed files with 7344 additions and 79 deletions

View File

@@ -1,4 +1,4 @@
# lodash v4.8.1
# lodash v4.9.0
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.divide v4.8.0
# lodash.divide v4.9.0
The [lodash](https://lodash.com/) method `_.divide` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var divide = require('lodash.divide');
```
See the [documentation](https://lodash.com/docs#divide) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.divide) for more details.
See the [documentation](https://lodash.com/docs#divide) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.divide) for more details.

View File

@@ -6,21 +6,91 @@
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseToNumber = require('lodash._basetonumber'),
baseToString = require('lodash._basetostring');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
NAN = 0 / 0;
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/** Built-in value references. */
var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/**
* The base implementation of `_.toNumber` which doesn't ensure correct
* conversions of binary, hexadecimal, or octal string values.
*
* @private
* @param {*} value The value to process.
* @returns {number} Returns the number.
*/
function baseToNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
return +value;
}
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
/**
* Creates a function that performs a mathematical operation on two values.
*
* @private
* @param {Function} operator The function to perform the operation.
* @param {number} [defaultValue] The value used for `undefined` arguments.
* @returns {Function} Returns the new mathematical operation function.
*/
function createMathOperation(operator) {
function createMathOperation(operator, defaultValue) {
return function(value, other) {
var result;
if (value === undefined && other === undefined) {
return 0;
return defaultValue;
}
if (value !== undefined) {
result = value;
@@ -42,6 +112,56 @@ function createMathOperation(operator) {
};
}
/**
* 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 _
* @since 4.0.0
* @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 _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
/**
* Divide two numbers.
*
@@ -59,6 +179,6 @@ function createMathOperation(operator) {
*/
var divide = createMathOperation(function(dividend, divisor) {
return dividend / divisor;
});
}, 1);
module.exports = divide;

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.divide",
"version": "4.8.0",
"version": "4.9.0",
"description": "The lodash method `_.divide` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -13,9 +13,5 @@
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basetonumber": "~4.12.0",
"lodash._basetostring": "~4.12.0"
}
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}

View File

@@ -1,4 +1,4 @@
# lodash.flatmapdeep v4.8.0
# lodash.flatmapdeep v4.9.0
The [lodash](https://lodash.com/) method `_.flatMapDeep` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var flatMapDeep = require('lodash.flatmapdeep');
```
See the [documentation](https://lodash.com/docs#flatMapDeep) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.flatmapdeep) for more details.
See the [documentation](https://lodash.com/docs#flatMapDeep) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.flatmapdeep) for more details.

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.flatmapdeep",
"version": "4.8.0",
"version": "4.9.0",
"description": "The lodash method `_.flatMapDeep` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -13,9 +13,5 @@
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._baseflatten": "~4.2.0",
"lodash.map": "^4.0.0"
}
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}

View File

@@ -1,4 +1,4 @@
# lodash.flatmapdepth v4.8.1
# lodash.flatmapdepth v4.9.0
The [lodash](https://lodash.com/) method `_.flatMapDepth` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var flatMapDepth = require('lodash.flatmapdepth');
```
See the [documentation](https://lodash.com/docs#flatMapDepth) or [package source](https://github.com/lodash/lodash/blob/4.8.1-npm-packages/lodash.flatmapdepth) for more details.
See the [documentation](https://lodash.com/docs#flatMapDepth) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.flatmapdepth) for more details.

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.flatmapdepth",
"version": "4.8.1",
"version": "4.9.0",
"description": "The lodash method `_.flatMapDepth` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -13,9 +13,5 @@
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._baseflatten": "~4.2.0",
"lodash.map": "^4.0.0"
}
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}

View File

@@ -1,4 +1,4 @@
# lodash.meanby v4.8.0
# lodash.meanby v4.9.0
The [lodash](https://lodash.com/) method `_.meanBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var meanBy = require('lodash.meanby');
```
See the [documentation](https://lodash.com/docs#meanBy) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.meanby) for more details.
See the [documentation](https://lodash.com/docs#meanBy) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.meanby) for more details.

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.meanby",
"version": "4.8.0",
"version": "4.9.0",
"description": "The lodash method `_.meanBy` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -13,8 +13,5 @@
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._baseiteratee": "~4.7.0"
}
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}

View File

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

View File

@@ -6,21 +6,91 @@
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseToNumber = require('lodash._basetonumber'),
baseToString = require('lodash._basetostring');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
NAN = 0 / 0;
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/** Built-in value references. */
var Symbol = root.Symbol;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/**
* The base implementation of `_.toNumber` which doesn't ensure correct
* conversions of binary, hexadecimal, or octal string values.
*
* @private
* @param {*} value The value to process.
* @returns {number} Returns the number.
*/
function baseToNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
return +value;
}
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
/**
* Creates a function that performs a mathematical operation on two values.
*
* @private
* @param {Function} operator The function to perform the operation.
* @param {number} [defaultValue] The value used for `undefined` arguments.
* @returns {Function} Returns the new mathematical operation function.
*/
function createMathOperation(operator) {
function createMathOperation(operator, defaultValue) {
return function(value, other) {
var result;
if (value === undefined && other === undefined) {
return 0;
return defaultValue;
}
if (value !== undefined) {
result = value;
@@ -42,6 +112,56 @@ function createMathOperation(operator) {
};
}
/**
* 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 _
* @since 4.0.0
* @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 _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
/**
* Multiply two numbers.
*
@@ -59,6 +179,6 @@ function createMathOperation(operator) {
*/
var multiply = createMathOperation(function(multiplier, multiplicand) {
return multiplier * multiplicand;
});
}, 1);
module.exports = multiply;

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.multiply",
"version": "4.8.0",
"version": "4.9.0",
"description": "The lodash method `_.multiply` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -13,9 +13,5 @@
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basetonumber": "~4.12.0",
"lodash._basetostring": "~4.12.0"
}
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.update",
"version": "4.8.0",
"version": "4.9.0",
"description": "The lodash method `_.update` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -15,7 +15,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._baseset": "~4.2.0",
"lodash._baseset": "~4.3.0",
"lodash._stringtopath": "~4.8.0"
}
}

View File

@@ -1,4 +1,4 @@
# lodash.updatewith v4.8.0
# lodash.updatewith v4.9.0
The [lodash](https://lodash.com/) method `_.updateWith` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var updateWith = require('lodash.updatewith');
```
See the [documentation](https://lodash.com/docs#updateWith) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.updatewith) for more details.
See the [documentation](https://lodash.com/docs#updateWith) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.updatewith) for more details.

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.updatewith",
"version": "4.8.0",
"version": "4.9.0",
"description": "The lodash method `_.updateWith` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -15,7 +15,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._baseset": "~4.2.0",
"lodash._baseset": "~4.3.0",
"lodash._stringtopath": "~4.8.0"
}
}