Repository navigation
Minor Changes
-
e7c5583: add new
toJSONmethod inFlagBoxandFlag -
b9e0d66: Add
resolveMaskutility, which resolves an array of flag names to their combined bit mask via the registry's combinator.add,remove,toggle,hasAll,hasAnyandhasNonenow use it internally instead of manual iteration.BREAKING CHANGE: passing the same flag twice in one call now does NOT
cancel it:toggle(flag, "a", "a", "b") !== toggle(flag, "b"). Now it
just toggles it once:toggle(flag, "a", "a", "b") === toggle(flag, "a", "b").
Patch Changes
- 7e8399f: Add
TBrandgeneric type tohasAll,hasAny,hasNoneandequalsoperators - 7f9dced: Fix
NumberCombinatortyping to makezeroproperty readonly. - be50bd7:
Repositorynow cacheskeys(),values()andentries()accessors in the constructor instead of re-creating them from theMapon every call.
FlagBox.toArray()andFlagBox.toObject()now iterate directly instead of chaining callbacks - 53ac337: Both
BigIntFlagRegistryandNumberFlagRegistrynow share a singleCombinatorinstance at the module level instead of allocation a new one per registry instance. - c90c94a: Fix both
NumberFlagRegistry.parse()andBigIntFlagRegistry.parse()to throw ParseError for empty-string input instrad of silently returning the empty flag.