Skip to content
Permalink
Newer
Older
100644 17 lines (12 sloc) 464 Bytes
Ignoring revisions in .git-blame-ignore-revs.
July 27, 2021 16:54
1
'use strict';
2
3
var GetIntrinsic = require('get-intrinsic');
4
5
var $TypeError = GetIntrinsic('%TypeError%');
6
7
var Type = require('../Type');
8
9
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal
10
11
module.exports = function BigIntEqual(x, y) {
12
if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
13
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
14
}
15
// shortcut for the actual spec mechanics
16
return x === y;
17
};