github-pages-deploy-action/node_modules/core-js-pure/internals/this-number-value.js
2020-03-06 22:45:40 -05:00

11 lines
316 B
JavaScript

var classof = require('../internals/classof-raw');
// `thisNumberValue` abstract operation
// https://tc39.github.io/ecma262/#sec-thisnumbervalue
module.exports = function (value) {
if (typeof value != 'number' && classof(value) != 'Number') {
throw TypeError('Incorrect invocation');
}
return +value;
};