@shuttle-lib/core
Version:
NPM package to interact with the Shuttle devices
17 lines • 504 B
JavaScript
;
/*
* This file contains internal convenience functions
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBit = exports.literal = void 0;
/** Convenience function to force the input to be of a certain type. */
function literal(o) {
return o;
}
exports.literal = literal;
/** Get bit value in integer */
function getBit(integer, bitPosition) {
return (integer & (1 << bitPosition)) === 0 ? 0 : 1;
}
exports.getBit = getBit;
//# sourceMappingURL=lib.js.map