mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 04:17:49 +00:00
Bump to v4.0.0.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
|
||||
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
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
# lodash.rearg v3.1.1
|
||||
# lodash.rearg v4.0.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.rearg` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
The [lodash](https://lodash.com/) method `_.rearg` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.rearg
|
||||
```
|
||||
|
||||
In Node.js/io.js:
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var rearg = require('lodash.rearg');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#rearg) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.rearg) for more details.
|
||||
See the [documentation](https://lodash.com/docs#rearg) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.rearg) for more details.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* lodash 3.1.1 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* lodash 4.0.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-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseFlatten = require('lodash._baseflatten'),
|
||||
createWrapper = require('lodash._createwrapper'),
|
||||
restParam = require('lodash.restparam');
|
||||
rest = require('lodash.rest');
|
||||
|
||||
/** Used to compose bitmasks for wrapper metadata. */
|
||||
var REARG_FLAG = 256;
|
||||
@@ -24,7 +24,7 @@ var REARG_FLAG = 256;
|
||||
* @category Function
|
||||
* @param {Function} func The function to rearrange arguments for.
|
||||
* @param {...(number|number[])} indexes The arranged argument indexes,
|
||||
* specified as individual indexes or arrays of indexes.
|
||||
* specified individually or in arrays.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
@@ -34,14 +34,8 @@ var REARG_FLAG = 256;
|
||||
*
|
||||
* rearged('b', 'c', 'a')
|
||||
* // => ['a', 'b', 'c']
|
||||
*
|
||||
* var map = _.rearg(_.map, [1, 0]);
|
||||
* map(function(n) {
|
||||
* return n * 3;
|
||||
* }, [1, 2, 3]);
|
||||
* // => [3, 6, 9]
|
||||
*/
|
||||
var rearg = restParam(function(func, indexes) {
|
||||
var rearg = rest(function(func, indexes) {
|
||||
return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes));
|
||||
});
|
||||
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
{
|
||||
"name": "lodash.rearg",
|
||||
"version": "3.1.1",
|
||||
"description": "The modern build of lodash’s `_.rearg` as a module.",
|
||||
"version": "4.0.0",
|
||||
"description": "The lodash method `_.rearg` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash, lodash-modularized, stdlib, util",
|
||||
"keywords": "lodash, lodash-modularized, stdlib, util, rearg",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
|
||||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||
"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._baseflatten": "^3.0.0",
|
||||
"lodash._baseflatten": "^4.0.0",
|
||||
"lodash._createwrapper": "^3.0.0",
|
||||
"lodash.restparam": "^3.0.0"
|
||||
"lodash.rest": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user