d3d2517ceeb1e07a1e07834388377b5edc75a5c95f775bb84f25b29528796ed74564ad4493112e4125c41c10f3af46cb4b32c93867e02d0411215a0f2e9723 455 B

1234567891011121314151617181920
  1. 'use strict';
  2. var callBound = require('call-bound');
  3. var $SyntaxError = require('es-errors/syntax');
  4. var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true);
  5. // https://262.ecma-international.org/15.0/#sec-thisbigintvalue
  6. module.exports = function ThisBigIntValue(value) {
  7. if (typeof value === 'bigint') {
  8. return value;
  9. }
  10. if (!$bigIntValueOf) {
  11. throw new $SyntaxError('BigInt is not supported');
  12. }
  13. return $bigIntValueOf(value);
  14. };