From 9bdb95c9e34cef640534e5e5a1e2225a80442000 Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期四, 09 六月 2022 15:48:15 +0800 Subject: [PATCH] TODO#139894 [ footer -最下方說明與保經代合作 ] 文案修改 --- PAMapp/node_modules/core-js/internals/function-bind.js | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 deletions(-) diff --git a/PAMapp/node_modules/core-js/internals/function-bind.js b/PAMapp/node_modules/core-js/internals/function-bind.js index 57f7a23..d0a4d66 100644 --- a/PAMapp/node_modules/core-js/internals/function-bind.js +++ b/PAMapp/node_modules/core-js/internals/function-bind.js @@ -1,27 +1,34 @@ 'use strict'; +var global = require('../internals/global'); +var uncurryThis = require('../internals/function-uncurry-this'); var aCallable = require('../internals/a-callable'); var isObject = require('../internals/is-object'); +var hasOwn = require('../internals/has-own-property'); +var arraySlice = require('../internals/array-slice'); +var NATIVE_BIND = require('../internals/function-bind-native'); -var slice = [].slice; +var Function = global.Function; +var concat = uncurryThis([].concat); +var join = uncurryThis([].join); var factories = {}; var construct = function (C, argsLength, args) { - if (!(argsLength in factories)) { + if (!hasOwn(factories, argsLength)) { for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']'; - // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only - factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')'); + factories[argsLength] = Function('C,a', 'return new C(' + join(list, ',') + ')'); } return factories[argsLength](C, args); }; // `Function.prototype.bind` method implementation // https://tc39.es/ecma262/#sec-function.prototype.bind -module.exports = Function.bind || function bind(that /* , ...args */) { - var fn = aCallable(this); - var partArgs = slice.call(arguments, 1); +module.exports = NATIVE_BIND ? Function.bind : function bind(that /* , ...args */) { + var F = aCallable(this); + var Prototype = F.prototype; + var partArgs = arraySlice(arguments, 1); var boundFunction = function bound(/* args... */) { - var args = partArgs.concat(slice.call(arguments)); - return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args); + var args = concat(partArgs, arraySlice(arguments)); + return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args); }; - if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype; + if (isObject(Prototype)) boundFunction.prototype = Prototype; return boundFunction; }; -- Gitblit v1.8.0