Urara-Blog/node_modules/.pnpm-store/v3/files/cf/59f36907cbd7651a98f0bc78faa7f3133792e5f3e6e6d3b9086d9a3e62f07ce5201e1dd46af9269de356a699fa5e2e4cd9f08514c1b7b1b7d5aad764f4646b
2022-08-14 01:14:53 +08:00

14 lines
362 B
Text

'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
// https://262.ecma-international.org/11.0/#sec-binaryor
module.exports = function BinaryOr(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;
};