| asIntN |
|
|
- |
| asUintN |
|
|
- |
| call-value-of-when-to-string-present.js |
---
description: ToPrimitive receives "hint Number" as parameter, then valueOf needs to be called
esid: sec-bigint-constructor-number-value
info: |
1. If NewTarget is not undefined, throw a TypeError exception.
2. Let prim be ? ToPrimitive(value, hint Number).
...
features: [BigInt]
--- |
589 |
- |
| constructor-empty-string.js |
---
description: Empty String should in BigInt should result into 0n
esid: sec-string-to-bigint
info: |
Apply the algorithm in 3.1.3.1 with the following changes:
EDITOR'S NOTE StringToBigInt("") is 0n according to the logic in 3.1.3.1.
features: [BigInt]
--- |
466 |
- |
| constructor-from-binary-string.js |
---
description: String should be parsed to BigInt according StringToBigInt
esid: sec-string-to-bigint
info: |
Apply the algorithm in 3.1.3.1 with the following changes:
- Replace the StrUnsignedDecimalLiteral production with DecimalDigits
to not allow decimal points or exponents.
features: [BigInt]
--- |
1075 |
- |
| constructor-from-decimal-string.js |
---
description: String should be parsed to BigInt according StringToBigInt
esid: sec-string-to-bigint
info: |
Apply the algorithm in 3.1.3.1 with the following changes:
- Replace the StrUnsignedDecimalLiteral production with DecimalDigits
to not allow decimal points or exponents.
features: [BigInt]
--- |
899 |
- |
| constructor-from-hex-string.js |
---
description: Hexdecimal prefixed String should be parsed to BigInt according StringToBigInt
esid: sec-string-to-bigint
info: |
Apply the algorithm in 3.1.3.1 with the following changes:
- Replace the StrUnsignedDecimalLiteral production with DecimalDigits
to not allow decimal points or exponents.
features: [BigInt]
--- |
865 |
- |
| constructor-from-octal-string.js |
---
description: Octal prefixed String should be parsed to BigInt according StringToBigInt
esid: sec-string-to-bigint
info: |
Apply the algorithm in 3.1.3.1 with the following changes:
- Replace the StrUnsignedDecimalLiteral production with DecimalDigits
to not allow decimal points or exponents.
features: [BigInt]
--- |
690 |
- |
| constructor-from-string-syntax-errors.js |
---
description: Invalid String into BigInt constructor should throw SyntaxError
esid: sec-string-to-bigint
info: |
Apply the algorithm in 3.1.3.1 with the following changes:
- Replace the StrUnsignedDecimalLiteral production with DecimalDigits
to not allow decimal points or exponents.
features: [BigInt]
--- |
1324 |
- |
| constructor-trailing-leading-spaces.js |
---
description: Tariling/Leading spaces should be ignored in BigInt constructor should
esid: sec-string-to-bigint
info: |
Apply the algorithm in 3.1.3.1 with the following changes:
- Replace the StrUnsignedDecimalLiteral production with DecimalDigits
to not allow decimal points or exponents.
features: [BigInt]
--- |
705 |
- |
| infinity-throws-rangeerror.js |
---
description: BigInt throws a RangeError if value is Infinity
esid: sec-bigint-constructor
info: |
BigInt ( value )
...
2. Let prim be ? ToPrimitive(value, hint Number).
3. If Type(prim) is Number, return ? NumberToBigInt(prim).
...
NumberToBigInt ( number )
...
2. If IsSafeInteger(number) is false, throw a RangeError exception.
...
IsSafeInteger ( number )
...
2. If number is NaN, +∞, or -∞, return false.
features: [BigInt]
--- |
894 |
- |
| issafeinteger-true.js |
---
description: Throws a TypeError if BigInt is called with a new target
esid: sec-bigint-constructor
info: |
...
3. If Type(prim) is Number, return ? NumberToBigInt(prim).
...
NumberToBigInt ( number )
2. If IsSafeInteger(number) is false, throw a RangeError exception.
features: [BigInt]
--- |
587 |
- |
| length.js |
---
esid: sec-bigint-constructor-number-value
description: BigInt.length property descriptor
info: |
BigInt ( value )
17 ECMAScript Standard Built-in Objects
Every built-in function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description. Optional parameters
(which are indicated with brackets: [ ]) or rest parameters (which
are shown using the form «...name») are not included in the default
argument count.
Unless otherwise specified, the length property of a built-in
function object has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
features: [BigInt]
--- |
1085 |
- |
| name.js |
---
esid: sec-bigint-constructor-number-value
description: BigInt.name property descriptor
info: |
BigInt ( value )
17 ECMAScript Standard Built-in Objects
Every built-in function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String. Unless otherwise specified, this value is the name that
is given to the function in this specification. For functions that
are specified as properties of objects, the name value is the
property name string used to access the function. [...]
Unless otherwise specified, the name property of a built-in function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
features: [BigInt]
--- |
1060 |
- |
| nan-throws-rangeerror.js |
---
description: BigInt throws a RangeError if value is NaN
esid: sec-bigint-constructor
info: |
BigInt ( value )
...
2. Let prim be ? ToPrimitive(value, hint Number).
3. If Type(prim) is Number, return ? NumberToBigInt(prim).
...
NumberToBigInt ( number )
...
2. If IsSafeInteger(number) is false, throw a RangeError exception.
...
IsSafeInteger ( number )
...
2. If number is NaN, +∞, or -∞, return false.
features: [BigInt]
--- |
879 |
- |
| negative-infinity-throws.rangeerror.js |
---
description: BigInt throws a RangeError if value is Infinity
esid: sec-bigint-constructor
info: |
BigInt ( value )
...
2. Let prim be ? ToPrimitive(value, hint Number).
3. If Type(prim) is Number, return ? NumberToBigInt(prim).
...
NumberToBigInt ( number )
...
2. If IsSafeInteger(number) is false, throw a RangeError exception.
...
IsSafeInteger ( number )
...
2. If number is NaN, +∞, or -∞, return false.
features: [BigInt]
--- |
903 |
- |
| new-target-throws.js |
---
description: Throws a TypeError if BigInt is called with a new target
esid: sec-bigint-constructor
info: |
1. If NewTarget is not undefined, throw a TypeError exception.
...
features: [BigInt]
--- |
541 |
- |
| non-integer-rangeerror.js |
---
description: Non integer number values will throw a RangeError
esid: sec-bigint-constructor
info: |
BigInt ( value )
...
2. Let prim be ? ToPrimitive(value, hint Number).
3. If Type(prim) is Number, return ? NumberToBigInt(prim).
...
NumberToBigInt ( number )
...
2. If IsSafeInteger(number) is false, throw a RangeError exception.
...
IsSafeInteger ( number )
...
2. If number is NaN, +∞, or -∞, return false.
3. Let integer be ToInteger(number).
4. If integer is not equal to number, return false.
...
features: [BigInt]
--- |
1141 |
- |
| out-of-bounds-integer-rangeerror.js |
---
description: BigInt throws a RangeError if value is not a safe integer.
esid: sec-bigint-constructor
info: |
BigInt ( value )
...
2. Let prim be ? ToPrimitive(value, hint Number).
3. If Type(prim) is Number, return ? NumberToBigInt(prim).
...
NumberToBigInt ( number )
...
2. If IsSafeInteger(number) is false, throw a RangeError exception.
...
IsSafeInteger ( number )
...
3. Let integer be ToInteger(number).
4. If integer is not equal to number, return false.
5. If abs(integer) ≤ 2**53-1, return true.
6. Otherwise, return false.
features: [BigInt]
--- |
896 |
- |
| parseInt |
|
|
- |
| prop-desc.js |
---
esid: sec-bigint-constructor
description: >
Property descriptor of BigInt
info: |
The BigInt Object
ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
features: [BigInt]
--- |
645 |
- |
| proto.js |
---
description: The prototype of BigInt constructor is Function.prototype
esid: sec-properties-of-the-bigint-constructor
info: |
The value of the [[Prototype]] internal slot of the BigInt constructor is the
intrinsic object %FunctionPrototype%.
features: [BigInt]
--- |
499 |
- |
| prototype |
|
|
- |
| value-of-throws.js |
---
description: Throws exception in BigIntConstructor if valueOf/toString does that
esid: sec-bigint-constructor-number-value
info: |
1. If NewTarget is not undefined, throw a TypeError exception.
2. Let prim be ? ToPrimitive(value, hint Number).
3. If Type(prim) is Number, return ? NumberToBigInt(prim).
4. Otherwise, return ? ToBigInt(value).
features: [BigInt]
--- |
763 |
- |