mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Cleanup default assignment of placeholders.
This commit is contained in:
18
lodash.js
18
lodash.js
@@ -9321,12 +9321,6 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// ensure `new lodashWrapper` is an instance of `lodash`
|
|
||||||
lodashWrapper.prototype = lodash.prototype;
|
|
||||||
|
|
||||||
// assign default placeholders
|
|
||||||
bind.placeholder = bindKey.placeholder = curry.placeholder = curryRight.placeholder = partial.placeholder = partialRight.placeholder = lodash;
|
|
||||||
|
|
||||||
// add functions that return wrapped values when chaining
|
// add functions that return wrapped values when chaining
|
||||||
lodash.after = after;
|
lodash.after = after;
|
||||||
lodash.assign = assign;
|
lodash.assign = assign;
|
||||||
@@ -9561,12 +9555,18 @@
|
|||||||
*/
|
*/
|
||||||
lodash.VERSION = VERSION;
|
lodash.VERSION = VERSION;
|
||||||
|
|
||||||
|
// ensure `new lodashWrapper` is an instance of `lodash`
|
||||||
|
lodashWrapper.prototype = lodash.prototype;
|
||||||
|
|
||||||
// add "Chaining" functions to the wrapper
|
// add "Chaining" functions to the wrapper
|
||||||
lodash.prototype.chain = wrapperChain;
|
lodash.prototype.chain = wrapperChain;
|
||||||
lodash.prototype.toJSON = wrapperValueOf;
|
|
||||||
lodash.prototype.toString = wrapperToString;
|
lodash.prototype.toString = wrapperToString;
|
||||||
lodash.prototype.value = wrapperValueOf;
|
lodash.prototype.toJSON = lodash.prototype.value = lodash.prototype.valueOf = wrapperValueOf;
|
||||||
lodash.prototype.valueOf = wrapperValueOf;
|
|
||||||
|
// assign default placeholders
|
||||||
|
arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
|
||||||
|
lodash[methodName].placeholder = lodash;
|
||||||
|
});
|
||||||
|
|
||||||
// add `Array` functions that return unwrapped values
|
// add `Array` functions that return unwrapped values
|
||||||
arrayEach(['join', 'pop', 'shift'], function(methodName) {
|
arrayEach(['join', 'pop', 'shift'], function(methodName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user