lodash-decorators
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -52,3 +52,9 @@ 'use strict'; | ||
return fn.apply(undefined, [Applicator.resolveFunction(args[0], target)].concat(_toConsumableArray(args.slice(1)))); | ||
return function () { | ||
for (var _len4 = arguments.length, invokeArgs = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
invokeArgs[_key4] = arguments[_key4]; | ||
} | ||
return fn.apply(undefined, [Applicator.resolveFunction(args[0], target)].concat(_toConsumableArray(args.slice(1)))).apply(undefined, invokeArgs); | ||
}; | ||
}, | ||
@@ -58,8 +64,15 @@ | ||
// needs to be given to the wrap method. | ||
wrap: function wrap(fn, target, value) { | ||
return fn(Applicator.resolveFunction(arguments[3], target), value); | ||
wrap: function wrap(fn, target, value, fnName) { | ||
return function () { | ||
for (var _len5 = arguments.length, invokeArgs = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { | ||
invokeArgs[_key5] = arguments[_key5]; | ||
} | ||
return fn(Applicator.resolveFunction(fnName, target), value).apply(undefined, invokeArgs); | ||
}; | ||
}, | ||
replace: function replace(fn, target, value) { | ||
for (var _len4 = arguments.length, args = Array(_len4 > 3 ? _len4 - 3 : 0), _key4 = 3; _key4 < _len4; _key4++) { | ||
args[_key4 - 3] = arguments[_key4]; | ||
for (var _len6 = arguments.length, args = Array(_len6 > 3 ? _len6 - 3 : 0), _key6 = 3; _key6 < _len6; _key6++) { | ||
args[_key6 - 3] = arguments[_key6]; | ||
} | ||
@@ -72,13 +85,20 @@ | ||
compose: function compose(fn, target, value) { | ||
for (var _len5 = arguments.length, args = Array(_len5 > 3 ? _len5 - 3 : 0), _key5 = 3; _key5 < _len5; _key5++) { | ||
args[_key5 - 3] = arguments[_key5]; | ||
for (var _len7 = arguments.length, args = Array(_len7 > 3 ? _len7 - 3 : 0), _key7 = 3; _key7 < _len7; _key7++) { | ||
args[_key7 - 3] = arguments[_key7]; | ||
} | ||
return fn.apply(undefined, [value].concat(_toConsumableArray(args.map(function (method) { | ||
return Applicator.resolveFunction(method, target); | ||
})))); | ||
return function () { | ||
for (var _len8 = arguments.length, invokeArgs = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { | ||
invokeArgs[_key8] = arguments[_key8]; | ||
} | ||
return fn.apply(undefined, [value].concat(_toConsumableArray(args.map(function (method) { | ||
return Applicator.resolveFunction(method, target); | ||
})))).apply(undefined, invokeArgs); | ||
}; | ||
}, | ||
partialed: function partialed(fn, target, value) { | ||
for (var _len6 = arguments.length, args = Array(_len6 > 3 ? _len6 - 3 : 0), _key6 = 3; _key6 < _len6; _key6++) { | ||
args[_key6 - 3] = arguments[_key6]; | ||
for (var _len9 = arguments.length, args = Array(_len9 > 3 ? _len9 - 3 : 0), _key9 = 3; _key9 < _len9; _key9++) { | ||
args[_key9 - 3] = arguments[_key9]; | ||
} | ||
@@ -89,4 +109,4 @@ | ||
single: function single(fn, target, value) { | ||
for (var _len7 = arguments.length, args = Array(_len7 > 3 ? _len7 - 3 : 0), _key7 = 3; _key7 < _len7; _key7++) { | ||
args[_key7 - 3] = arguments[_key7]; | ||
for (var _len10 = arguments.length, args = Array(_len10 > 3 ? _len10 - 3 : 0), _key10 = 3; _key10 < _len10; _key10++) { | ||
args[_key10 - 3] = arguments[_key10]; | ||
} | ||
@@ -100,4 +120,4 @@ | ||
invoke: function invoke(applicator, method, target, value) { | ||
for (var _len8 = arguments.length, args = Array(_len8 > 4 ? _len8 - 4 : 0), _key8 = 4; _key8 < _len8; _key8++) { | ||
args[_key8 - 4] = arguments[_key8]; | ||
for (var _len11 = arguments.length, args = Array(_len11 > 4 ? _len11 - 4 : 0), _key11 = 4; _key11 < _len11; _key11++) { | ||
args[_key11 - 4] = arguments[_key11]; | ||
} | ||
@@ -104,0 +124,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "A collection of decorators using lodash at it's core.", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"engines": { | ||
@@ -8,0 +8,0 @@ "node": ">=0.12.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36932
620