Remove arguments references where possible.

This commit is contained in:
John-David Dalton
2017-01-09 18:30:38 -08:00
parent f2c49500ee
commit 627bfe6bfa
5 changed files with 7 additions and 33 deletions

View File

@@ -18,16 +18,9 @@ import root from './_root.js';
function createCurry(func, bitmask, arity) {
const Ctor = createCtor(func);
function wrapper() {
let length = arguments.length;
let index = length;
const args = Array(length);
function wrapper(...args) {
let length = args.length;
const placeholder = getHolder(wrapper);
while (index--) {
args[index] = arguments[index];
}
const holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
? []
: replaceHolders(args, placeholder);