Repository navigation
Releases: ThatsEmbarrassing/bitwise-flag
Release list
v2.1.0
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.
v2.0.1
Patch Changes
- cc8f98d: Set minimal engines.node version to 22 (LTS).
- 0b800dd: Change GITHUB_TOKEN to fine-granted RELEASE_TOKEN
- 19ca804: Fix
Repository.has()to report presence by key registration instead of coercing the stored bit value, so flags with a falsy (0/0n) value are no longer treated as absent. - b2340de: Fix package metadata; add sideEffects, commitlint and git hooks; normalize repository URL
- 91de837: Add npm discoverability metadata:
description,keywordsandhomepage.
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
Changelog keeping starts with version 2.0.0. Earlier releases (
1.1.0and
below) predate this file and are not documented here. For step-by-step upgrade
instructions see MIGRATIONS.md.