Bump to v4.0.0.

This commit is contained in:
John-David Dalton
2016-02-26 01:06:04 -08:00
parent 51e917b094
commit d35a9c40be
1337 changed files with 70148 additions and 17945 deletions

View File

@@ -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

View File

@@ -1,20 +1,18 @@
# lodash.partial v3.1.1
# lodash.partial v4.0.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodashs](https://lodash.com/) `_.partial` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
The [lodash](https://lodash.com/) method `_.partial` exported as a [Node.js](https://nodejs.org/) module.
## Installation
Using npm:
```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash.partial
```
In Node.js/io.js:
In Node.js:
```js
var partial = require('lodash.partial');
```
See the [documentation](https://lodash.com/docs#partial) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.partial) for more details.
See the [documentation](https://lodash.com/docs#partial) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.partial) for more details.

View File

@@ -1,31 +1,42 @@
/**
* 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 createWrapper = require('lodash._createwrapper'),
replaceHolders = require('lodash._replaceholders'),
restParam = require('lodash.restparam');
rest = require('lodash.rest');
/** Used to compose bitmasks for wrapper metadata. */
var PARTIAL_FLAG = 32;
/** Used as the internal argument placeholder. */
var PLACEHOLDER = '__lodash_placeholder__';
/**
* Creates a `_.partial` or `_.partialRight` function.
* Replaces all `placeholder` elements in `array` with an internal placeholder
* and returns an array of their indexes.
*
* @private
* @param {boolean} flag The partial bit flag.
* @returns {Function} Returns the new partial function.
* @param {Array} array The array to modify.
* @param {*} placeholder The placeholder to replace.
* @returns {Array} Returns the new array of placeholder indexes.
*/
function createPartial(flag) {
var partialFunc = restParam(function(func, partials) {
var holders = replaceHolders(partials, partialFunc.placeholder);
return createWrapper(func, flag, undefined, partials, holders);
});
return partialFunc;
function replaceHolders(array, placeholder) {
var index = -1,
length = array.length,
resIndex = -1,
result = [];
while (++index < length) {
if (array[index] === placeholder) {
array[index] = PLACEHOLDER;
result[++resIndex] = index;
}
}
return result;
}
/**
@@ -36,7 +47,7 @@ function createPartial(flag) {
* The `_.partial.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
* **Note:** This method does not set the "length" property of partially
* **Note:** This method doesn't set the "length" property of partially
* applied functions.
*
* @static
@@ -55,12 +66,15 @@ function createPartial(flag) {
* sayHelloTo('fred');
* // => 'hello fred'
*
* // using placeholders
* // Partially applied with placeholders.
* var greetFred = _.partial(greet, _, 'fred');
* greetFred('hi');
* // => 'hi fred'
*/
var partial = createPartial(PARTIAL_FLAG);
var partial = rest(function(func, partials) {
var holders = replaceHolders(partials, partial.placeholder);
return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders);
});
// Assign default placeholders.
partial.placeholder = {};

View File

@@ -1,24 +1,21 @@
{
"name": "lodash.partial",
"version": "3.1.1",
"description": "The modern build of lodashs `_.partial` as a module.",
"version": "4.0.0",
"description": "The lodash method `_.partial` 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, partial",
"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._createwrapper": "^3.0.0",
"lodash._replaceholders": "^3.0.0",
"lodash.restparam": "^3.0.0"
"lodash.rest": "^4.0.0"
}
}