just-partial-it
Advanced tools
Comparing version 1.1.19 to 1.1.20
@@ -9,5 +9,2 @@ module.exports = partial; | ||
var globalObj = global || self; | ||
globalObj.___ = {}; | ||
function partial(fn /*, arg1, arg2 etc */) { | ||
@@ -22,3 +19,3 @@ var partialArgs = [].slice.call(arguments, 1); | ||
var thisPartialArg = partialArgs[i]; | ||
derivedArgs[i] = thisPartialArg === globalObj.___ ? arguments[argIndex++] : thisPartialArg; | ||
derivedArgs[i] = thisPartialArg === undefined ? arguments[argIndex++] : thisPartialArg; | ||
} | ||
@@ -25,0 +22,0 @@ return fn.apply(this, derivedArgs); |
{ | ||
"name": "just-partial-it", | ||
"version": "1.1.19", | ||
"version": "1.1.20", | ||
"description": "return a partial function", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,5 +9,5 @@ ## just-partial-it | ||
const cubedRoot = partial(Math.pow, _, 1/3); | ||
const cubedRoot = partial(Math.pow, undefined, 1/3); | ||
cubedRoot(10).toFixed(1); // 56.7 | ||
cubedRoot(35).toFixed(1); // 16.2 | ||
``` |
1387
20