frontend/.pnpm-store/v3/files/9a/c236570ae4409ad13aa4e37bb6f584cc005eb0bb00395d2b442ced2b20be894628204754a6da7b8d4b4268ab068c61ace7302169abff9c50304e339327fd10

15 lines
364 B
Plaintext

'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
// https://262.ecma-international.org/11.0/#sec-binaryxor
module.exports = function BinaryXor(x, y) {
if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
}
return x ^ y;
};