UNPKG

partial-application

Version:

Enables partial application without affecting the receiver (ie. 'this').

1 lines 559 B
!function(a){"use strict";var b={};!function(a){function b(a){var b;if("function"!=typeof a)throw"First argument must be a function.";return arguments.length<=1?a:(b=Array.prototype.slice.call(arguments,1),function(){return a.apply(this,b.concat(Array.prototype.slice.call(arguments)))})}function c(a){var c=arguments;return function(a){return b.apply(this,c).apply(this,arguments)}}a.partial=b,a.partial1=c}(b),"object"==typeof exports&&module?module.exports=b:"function"==typeof define&&define.amd?define(function(){return b}):a.partialApplication=b}(this);