mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Bump to v4.1.0.
This commit is contained in:
22
lodash.zipobjectdeep/LICENSE
Normal file
22
lodash.zipobjectdeep/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
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 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.
|
||||
18
lodash.zipobjectdeep/README.md
Normal file
18
lodash.zipobjectdeep/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# lodash.zipobjectdeep v4.1.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.zipObjectDeep` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.zipobjectdeep
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var zipObjectDeep = require('lodash.zipobjectdeep');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#zipObjectDeep) or [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash.zipobjectdeep) for more details.
|
||||
50
lodash.zipobjectdeep/index.js
Normal file
50
lodash.zipobjectdeep/index.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* lodash 4.1.0 (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');
|
||||
|
||||
/**
|
||||
* This base implementation of `_.zipObject` which assigns values using `assignFunc`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} props The property names.
|
||||
* @param {Array} values The property values.
|
||||
* @param {Function} assignFunc The function to assign values.
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
function baseZipObject(props, values, assignFunc) {
|
||||
var index = -1,
|
||||
length = props.length,
|
||||
valsLength = values.length,
|
||||
result = {};
|
||||
|
||||
while (++index < length) {
|
||||
assignFunc(result, props[index], index < valsLength ? values[index] : undefined);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.zipObject` except that it supports property paths.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Array
|
||||
* @param {Array} [props=[]] The property names.
|
||||
* @param {Array} [values=[]] The property values.
|
||||
* @returns {Object} Returns the new object.
|
||||
* @example
|
||||
*
|
||||
* _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
|
||||
* // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
|
||||
*/
|
||||
function zipObjectDeep(props, values) {
|
||||
return baseZipObject(props || [], values || [], baseSet);
|
||||
}
|
||||
|
||||
module.exports = zipObjectDeep;
|
||||
20
lodash.zipobjectdeep/package.json
Normal file
20
lodash.zipobjectdeep/package.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "lodash.zipobjectdeep",
|
||||
"version": "4.1.0",
|
||||
"description": "The lodash method `_.zipObjectDeep` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash-modularized, zipobjectdeep",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user