@luminelabs/toolkit
v0.1.1
Published
Personal TypeScript utility primitives (internal / experimental).
Readme
@luminelabs/toolkit
⚠️ Experimental / Internal Use
Primarily intended for personal and internal use. It may change, break, or be restructured at any time. Don't rely on it for public projects unless you're prepared to maintain your own fork. Issues/feature requests may be closed without response.
Small, framework-free TypeScript primitives. ESM-only. Ships types.
Install
npm install @luminelabs/toolkitPeer-free; pulls in es-toolkit as its only runtime dependency (tree-shakeable).
What's inside
Everything is re-exported from the package root. Source is organised by domain under src/:
async/—LinkedAbortController(chains anAbortControllerto parent signals).dom/—createFileList(theDataTransfertrick for populating a file input),getTextWidth,isIFrame,observeResize+extractEntrySize(one sharedResizeObserverper box type, refcounted).errors/—tc(error-first[error, value]result tuples overes-toolkit'sattempt, plussyncSafe/asyncSafewith anonErrorcallback),assertNever.object/—shallowEqual(one-level equality with an optional per-key comparator).pubsub/—EventBus(typed event map),createKeyedStore(refcounted per-key subscription store with anonActiveresource lifecycle).string/—maskString,sortStrings.types/—Enum(const-object enum helper +Enum<T>type),DeepPartial.
import { EventBus, tc, Enum } from "@luminelabs/toolkit"For anything not covered here, reach for es-toolkit directly — this package deliberately doesn't re-wrap what it already does well.
License
MIT © Lumine Labs
