UNPKG

locutus

Version:

Locutus other languages' standard libraries to JavaScript for fun and educational purposes

16 lines (15 loc) 641 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.lshift = lshift; const _operator_ts_1 = require("../_helpers/_operator.js"); function lshift(a, b) { // discuss at: https://locutus.io/python/operator/lshift/ // parity verified: Python 3.12 // original by: Kevin van Zonneveld (https://kvz.io) // note 1: Performs Python-style integer left shifts using bigint-backed arithmetic. // example 1: lshift(3, 2) // returns 1: 12 // example 2: lshift(true, 3) // returns 2: 8 return (0, _operator_ts_1.pythonLShift)(a, b, 'lshift'); }