utility belt for JS 🦕 ancient not extinct
design:
- kitchen-sink utilities library - sorry, I wish it weren't so, JS made me do it
- two optional runtime dependencies on
zodandesm-env, one optional type dependency on@types/node - mix of JS module environments - browser-only, Node-only, universal
- mostly small pure functions
- all TypeScript, for styles and Svelte and SvelteKit see @fuzdev/fuz_ui
- complements the modern web platform, drops legacy quickly
- kinda minimal in many ways but also not, treeshakes well
- includes a benchmarking library with rich statistical analysis
Install from npm:
npm i -D @fuzdev/fuz_utilImport modules at their full paths:
import {type Result, unwrap} from '@fuzdev/fuz_util/result.js';
import {random_int} from '@fuzdev/fuz_util/random.js';.ts imports also work:
import {deep_equal} from '@fuzdev/fuz_util/deep_equal.ts';Docs at util.fuz.dev/docs.
See docs/benchmark.md.
npm run build
# or
gro buildFor more see Vitest and Gro's test docs.
gro test
gro test filepattern1 filepatternB
gro test -- --forwarded-args 'to vitest'Deploy
(build, commit, and push) to the deploy branch, e.g. for GitHub Pages:
npm run deploy
# or
gro deployMy sister Lisa helped me with the logo - instagram.com/lisaeatkinson - she's a designer and currently looking for work