locutus
Version:
Locutus other languages' standard libraries to JavaScript for fun and educational purposes
16 lines (15 loc) • 608 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.or_ = or_;
const _operator_ts_1 = require("../_helpers/_operator.js");
function or_(a, b) {
// discuss at: https://locutus.io/python/operator/or_/
// parity verified: Python 3.12
// original by: Kevin van Zonneveld (https://kvz.io)
// note 1: Performs Python-style bitwise or on integer-like values.
// example 1: or_(4, 1)
// returns 1: 5
// example 2: or_(true, false)
// returns 2: true
return (0, _operator_ts_1.pythonBitOr)(a, b, 'or_');
}