-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid a check of the target in the internal
function-uncurry-this
h…
…elper where it's not required
- Loading branch information
Showing
15 changed files
with
33 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/core-js/internals/fix-regexp-well-known-symbol-logic.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var classofRaw = require('../internals/classof-raw'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
|
||
module.exports = function (fn) { | ||
// Nashorn bug: | ||
// https://github.com/zloirock/core-js/issues/1128 | ||
// https://github.com/zloirock/core-js/issues/1130 | ||
if (classofRaw(fn) === 'Function') return uncurryThis(fn); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
var classofRaw = require('../internals/classof-raw'); | ||
var uncurryThisRaw = require('../internals/function-uncurry-this-raw'); | ||
var NATIVE_BIND = require('../internals/function-bind-native'); | ||
|
||
module.exports = function (fn) { | ||
// Nashorn bug: | ||
// https://github.com/zloirock/core-js/issues/1128 | ||
// https://github.com/zloirock/core-js/issues/1130 | ||
if (classofRaw(fn) === 'Function') return uncurryThisRaw(fn); | ||
var FunctionPrototype = Function.prototype; | ||
var call = FunctionPrototype.call; | ||
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call); | ||
|
||
module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) { | ||
return function () { | ||
return call.apply(fn, arguments); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
var $ = require('../internals/export'); | ||
var uncurryThisRaw = require('../internals/function-uncurry-this-raw'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
var aCallable = require('../internals/a-callable'); | ||
|
||
// `Function.prototype.unThis` method | ||
// https://github.com/js-choi/proposal-function-un-this | ||
$({ target: 'Function', proto: true, forced: true }, { | ||
unThis: function unThis() { | ||
return uncurryThisRaw(aCallable(this)); | ||
return uncurryThis(aCallable(this)); | ||
} | ||
}); |