github-pages-deploy-action/node_modules/core-js-pure/internals/this-number-value.js

11 lines
316 B
JavaScript
Raw Normal View History

2020-03-07 11:45:40 +08:00
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;
};