standaardisation updates
This commit is contained in:
22
convert/lodash/lodash._createwrapper/LICENSE.txt
Normal file
22
convert/lodash/lodash._createwrapper/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js 1.5.2, copyright 2009-2013 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.
|
||||
15
convert/lodash/lodash._createwrapper/README.md
Normal file
15
convert/lodash/lodash._createwrapper/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# lodash._createwrapper v2.3.0
|
||||
|
||||
The internal [Lo-Dash](http://lodash.com/) function `createWrapper` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
|
||||
|
||||
## Author
|
||||
|
||||
| [](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
|
||||
|---|
|
||||
| [John-David Dalton](http://allyoucanleet.com/) |
|
||||
|
||||
## Contributors
|
||||
|
||||
| [](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|
||||
|---|---|---|
|
||||
| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
|
||||
98
convert/lodash/lodash._createwrapper/index.js
Normal file
98
convert/lodash/lodash._createwrapper/index.js
Normal file
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>
|
||||
* Build: `lodash modularize modern exports="npm" -o ./npm/`
|
||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <http://lodash.com/license>
|
||||
*/
|
||||
var baseBind = require('./../lodash._basebind'),
|
||||
baseCreateWrapper = require('./../lodash._basecreatewrapper'),
|
||||
isFunction = require('./../lodash.isfunction');
|
||||
|
||||
/**
|
||||
* Used for `Array` method references.
|
||||
*
|
||||
* Normally `Array.prototype` would suffice, however, using an array literal
|
||||
* avoids issues in Narwhal.
|
||||
*/
|
||||
var arrayRef = [];
|
||||
|
||||
/** Native method shortcuts */
|
||||
var push = arrayRef.push;
|
||||
|
||||
/**
|
||||
* Creates a function that, when called, either curries or invokes `func`
|
||||
* with an optional `this` binding and partially applied arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function|string} func The function or method name to reference.
|
||||
* @param {number} bitmask The bitmask of method flags to compose.
|
||||
* The bitmask may be composed of the following flags:
|
||||
* 1 - `_.bind`
|
||||
* 2 - `_.bindKey`
|
||||
* 4 - `_.curry`
|
||||
* 8 - `_.curry` (bound)
|
||||
* 16 - `_.partial`
|
||||
* 32 - `_.partialRight`
|
||||
* @param {Array} [partialArgs] An array of arguments to prepend to those
|
||||
* provided to the new function.
|
||||
* @param {Array} [partialRightArgs] An array of arguments to append to those
|
||||
* provided to the new function.
|
||||
* @param {*} [thisArg] The `this` binding of `func`.
|
||||
* @param {number} [arity] The arity of `func`.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) {
|
||||
var isBind = bitmask & 1,
|
||||
isBindKey = bitmask & 2,
|
||||
isCurry = bitmask & 4,
|
||||
isCurryBound = bitmask & 8,
|
||||
isPartial = bitmask & 16,
|
||||
isPartialRight = bitmask & 32;
|
||||
|
||||
if (!isBindKey && !isFunction(func)) {
|
||||
throw new TypeError;
|
||||
}
|
||||
if (isPartial && !partialArgs.length) {
|
||||
bitmask &= ~16;
|
||||
isPartial = partialArgs = false;
|
||||
}
|
||||
if (isPartialRight && !partialRightArgs.length) {
|
||||
bitmask &= ~32;
|
||||
isPartialRight = partialRightArgs = false;
|
||||
}
|
||||
var bindData = func && func.__bindData__;
|
||||
if (bindData && bindData !== true) {
|
||||
bindData = bindData.slice();
|
||||
|
||||
// set `thisBinding` is not previously bound
|
||||
if (isBind && !(bindData[1] & 1)) {
|
||||
bindData[4] = thisArg;
|
||||
}
|
||||
// set if previously bound but not currently (subsequent curried functions)
|
||||
if (!isBind && bindData[1] & 1) {
|
||||
bitmask |= 8;
|
||||
}
|
||||
// set curried arity if not yet set
|
||||
if (isCurry && !(bindData[1] & 4)) {
|
||||
bindData[5] = arity;
|
||||
}
|
||||
// append partial left arguments
|
||||
if (isPartial) {
|
||||
push.apply(bindData[2] || (bindData[2] = []), partialArgs);
|
||||
}
|
||||
// append partial right arguments
|
||||
if (isPartialRight) {
|
||||
push.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
|
||||
}
|
||||
// merge flags
|
||||
bindData[1] |= bitmask;
|
||||
return createWrapper.apply(null, bindData);
|
||||
}
|
||||
// fast path for `_.bind`
|
||||
var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper;
|
||||
return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]);
|
||||
}
|
||||
|
||||
module.exports = createWrapper;
|
||||
21
convert/lodash/lodash._createwrapper/package.json
Normal file
21
convert/lodash/lodash._createwrapper/package.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "lodash._createwrapper",
|
||||
"version": "2.3.0",
|
||||
"description": "The internal Lo-Dash function `createWrapper` as a Node.js module generated by lodash-cli.",
|
||||
"homepage": "http://lodash.com/custom-builds",
|
||||
"license": "MIT",
|
||||
"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> (http://www.iceddev.com/)",
|
||||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
|
||||
],
|
||||
"bugs": "https://github.com/lodash/lodash-cli/issues",
|
||||
"repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
|
||||
"dependencies": {
|
||||
"lodash._basebind": "~2.3.0",
|
||||
"lodash._basecreatewrapper": "~2.3.0",
|
||||
"lodash.isfunction": "~2.3.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user