Skip to content

Commit

Permalink
lib: simplify primordials.uncurryThis
Browse files Browse the repository at this point in the history
PR-URL: #36866
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Pooja D P <[email protected]>
  • Loading branch information
ExE-Boss authored and danielleadams committed Jan 12, 2021
1 parent 01213c7 commit 1db3772
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/internal/per_context/primordials.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1db3772

Please sign in to comment.