Sha256: 4e4566ea570386189a02ef196ce97b1aa4eaac4d7019c63f4625b4cf077dde51
Contents?: true
Size: 557 Bytes
Versions: 108
Compression:
Stored size: 557 Bytes
Contents
'use strict'; var GetIntrinsic = require('get-intrinsic'); var callBound = require('call-bind/callBound'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true); var Type = require('./Type'); // https://262.ecma-international.org/11.0/#sec-thisbigintvalue module.exports = function thisBigIntValue(value) { var type = Type(value); if (type === 'BigInt') { return value; } if (!$bigIntValueOf) { throw new $SyntaxError('BigInt is not supported'); } return $bigIntValueOf(value); };
Version data entries
108 entries across 27 versions & 2 rubygems