lib: simplify primordials.uncurryThis

PR-URL: https://github.com/nodejs/node/pull/36866
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
This commit is contained in:
ExE Boss authored and Antoine du Hamel committed 2021-01-12 14:47:37 +01:00
1 parent 2e909c4fcc
commit 1a0c5d57aa
1 file changed
+3 -3
+3 -3
View File
@@ -13,10 +13,10 @@
// by the native module compiler.
// `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`.
// It is using `call.bind(bind, call)` to avoid using `Function.prototype.bind`
// after it may have been mutated by users.
// It is using `bind.bind(call)` to avoid using `Function.prototype.bind`
// and `Function.prototype.call` after it may have been mutated by users.
const { bind, call } = Function.prototype;
const uncurryThis = call.bind(bind, call);
const uncurryThis = bind.bind(call);
primordials.uncurryThis = uncurryThis;
function copyProps(src, dest) {