The typed helpers every Node and React project rewrites: typed URLs, retry, debounce, storage and React hooks. Zero dependencies, ESM.
Install • API • Changelog • Contribute
Maximus is not another Lodash. Modern JavaScript already covers most of it.
Maximus covers the rest: the helpers every project rewrites, each hiding real complexity behind a small interface.
- Platform-first: nothing that Node 24+ or modern browsers already provide.
- Types do the work: types are inferred from literals, so misuse fails at compile time.
- No surprises: "no match" returns
nullinstead of throwing. Inputs are never mutated. - Zero runtime dependencies: ESM only and tree-shakable. Import one function, ship one function.
npm i mxsRequires Node 24 or newer. On Node, require('mxs') also works.
React hooks live in mxs/react and need React 18 or newer. React is an optional peer dependency.
import { buildPath, matchPath } from 'mxs';
buildPath('/users/:userId', { params: { userId: '42' } });
// => '/users/42'
matchPath('/users/:userId', '/users/42?tab=posts');
// => { params: { userId: '42' } }| Area | Modules |
|---|---|
| Paths and URLs | buildPath, matchPath, parseSearchParams |
| Async | retry, mapWithConcurrency, dedupeInFlight |
| Timing | debounce, throttle |
| Storage and events | createTypedStorage, createTypedEmitter |
| Data and formatting | transformData, convertKeys, removeDuplicates, formatRelativeTime |
| React hooks | useStorageState, useDebouncedValue, usePrevious, useMediaQuery, useEventListener, useClickOutside, useInterval |
Signatures and behavior for each one are in the API reference.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Read AGENTS.md for the project rules. Commits follow Conventional Commits: semantic-release picks the version and writes CHANGELOG.md from them.
MIT License © Helder Burato Berto
