mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Bump to v4.0.1.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# lodash.frompairs v4.0.0
|
||||
# lodash.frompairs v4.0.1
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.fromPairs` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var fromPairs = require('lodash.frompairs');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#fromPairs) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.frompairs) for more details.
|
||||
See the [documentation](https://lodash.com/docs#fromPairs) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.frompairs) for more details.
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
/**
|
||||
* lodash 4.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseSet = require('lodash._baseset');
|
||||
|
||||
/**
|
||||
* The inverse of `_.toPairs`; this method returns an object composed
|
||||
@@ -14,13 +13,14 @@ var baseSet = require('lodash._baseset');
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Array
|
||||
* @param {Array} pairs The key-value pairs.
|
||||
* @returns {Object} Returns the new object.
|
||||
* @example
|
||||
*
|
||||
* _.fromPairs([['fred', 30], ['barney', 40]]);
|
||||
* // => { 'fred': 30, 'barney': 40 }
|
||||
* _.fromPairs([['a', 1], ['b', 2]]);
|
||||
* // => { 'a': 1, 'b': 2 }
|
||||
*/
|
||||
function fromPairs(pairs) {
|
||||
var index = -1,
|
||||
@@ -29,7 +29,7 @@ function fromPairs(pairs) {
|
||||
|
||||
while (++index < length) {
|
||||
var pair = pairs[index];
|
||||
baseSet(result, pair[0], pair[1]);
|
||||
result[pair[0]] = pair[1];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.frompairs",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"description": "The lodash method `_.fromPairs` 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._baseset": "^4.0.0"
|
||||
}
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user