There was an error while loading. Please reload this page.
thisNumberValue
1 parent c526e7a commit f562bc0Copy full SHA for f562bc0
packages/core-js/internals/this-number-value.js
@@ -1,10 +1,7 @@
1
-var classof = require('../internals/classof-raw');
+var valueOf = 1.0.valueOf;
2
3
// `thisNumberValue` abstract operation
4
// https://tc39.es/ecma262/#sec-thisnumbervalue
5
module.exports = function (value) {
6
- if (typeof value != 'number' && classof(value) != 'Number') {
7
- throw TypeError('Incorrect invocation');
8
- }
9
- return +value;
+ return valueOf.call(value);
10
};
0 commit comments