Apply more let/const transforms.

This commit is contained in:
John-David Dalton
2017-01-08 23:38:19 -08:00
parent ca9e6fa087
commit 4d0c15b49e
115 changed files with 621 additions and 613 deletions

View File

@@ -2,7 +2,7 @@ import createCtor from './_createCtor.js';
import root from './_root.js';
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG = 1;
const WRAP_BIND_FLAG = 1;
/**
* Creates a function that wraps `func` to invoke it with the optional `this`
@@ -15,11 +15,11 @@ var WRAP_BIND_FLAG = 1;
* @returns {Function} Returns the new wrapped function.
*/
function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
const isBind = bitmask & WRAP_BIND_FLAG;
const Ctor = createCtor(func);
function wrapper(...args) {
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
const fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return fn.apply(isBind ? thisArg : this, args);
}
return wrapper;