Frontend/25_01_07/mai/node_modules/es-abstract/2024/ThisNumberValue.js
szabomarton 7f4a15b9c3 asd
2025-01-28 11:38:27 +01:00

16 lines
320 B
JavaScript

'use strict';
var callBound = require('call-bound');
var $NumberValueOf = callBound('Number.prototype.valueOf');
// https://262.ecma-international.org/15.0/#sec-thisnumbervalue
module.exports = function ThisNumberValue(value) {
if (typeof value === 'number') {
return value;
}
return $NumberValueOf(value);
};