This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/core-js/modules/_partial.js

26 lines
782 B
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
'use strict';
var path = require('./_path');
var invoke = require('./_invoke');
var aFunction = require('./_a-function');
module.exports = function (/* ...pargs */) {
var fn = aFunction(this);
var length = arguments.length;
var pargs = new Array(length);
var i = 0;
var _ = path._;
var holder = false;
while (length > i) if ((pargs[i] = arguments[i++]) === _) holder = true;
return function (/* ...args */) {
var that = this;
var aLen = arguments.length;
var j = 0;
var k = 0;
var 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);
};
};