|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
453 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var callBound = require('call-bound');
|
|---|
| 4 |
|
|---|
| 5 | var $SyntaxError = require('es-errors/syntax');
|
|---|
| 6 | var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true);
|
|---|
| 7 |
|
|---|
| 8 | // https://262.ecma-international.org/11.0/#sec-thisbigintvalue
|
|---|
| 9 |
|
|---|
| 10 | module.exports = function thisBigIntValue(value) {
|
|---|
| 11 | if (typeof value === 'bigint') {
|
|---|
| 12 | return value;
|
|---|
| 13 | }
|
|---|
| 14 | if (!$bigIntValueOf) {
|
|---|
| 15 | throw new $SyntaxError('BigInt is not supported');
|
|---|
| 16 | }
|
|---|
| 17 | return $bigIntValueOf(value);
|
|---|
| 18 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.