Files
hackathon-v-escape-4ff8b5a6…/frontend/node_modules/es-abstract/2020/BigInt/leftShift.js
marianesaldana 80dbd947e5 Initial commit
2026-05-23 08:59:34 -06:00

15 lines
394 B
JavaScript

'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift
module.exports = function BigIntLeftShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x << y;
};