UNPKG

@bithomp/xrpl-api

Version:

A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger

18 lines (17 loc) 447 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseFlags = parseFlags; function parseFlags(value, keys, options = {}) { const flags = {}; for (const flagName in keys) { if (value & keys[flagName]) { flags[flagName] = true; } else { if (!options.excludeFalse) { flags[flagName] = false; } } } return flags; }