X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fcore-js%2Fmodules%2F_partial.js;fp=node_modules%2Fcore-js%2Fmodules%2F_partial.js;h=3d411b705de63bd5bd41f06845869158c726f53f;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/core-js/modules/_partial.js b/node_modules/core-js/modules/_partial.js new file mode 100644 index 000000000..3d411b705 --- /dev/null +++ b/node_modules/core-js/modules/_partial.js @@ -0,0 +1,23 @@ +'use strict'; +var path = require('./_path') + , invoke = require('./_invoke') + , aFunction = require('./_a-function'); +module.exports = function(/* ...pargs */){ + var fn = aFunction(this) + , length = arguments.length + , pargs = Array(length) + , i = 0 + , _ = path._ + , holder = false; + while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; + return function(/* ...args */){ + var that = this + , aLen = arguments.length + , j = 0, k = 0, args; + if(!holder && !aLen)return invoke(fn, pargs, that); + args = pargs.slice(); + if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; + while(aLen > k)args.push(arguments[k++]); + return invoke(fn, args, that); + }; +}; \ No newline at end of file