belt

utility belt for JS πŸ¦• ancient not extinct

MIT License

Downloads
2.9K
Stars
3

@ryanatkn/belt

utility belt for JS πŸ¦• ancient not extinct

belt.ryanatkn.com

design:

  • zero dependency kitchen-sink utilities library - sorry, I wish it weren't so, JS made me do it
  • mix of JS module environments - browser-only, Node-only, universal
  • mostly small pure functions
  • all TypeScript, for styles and Svelte and SvelteKit
    see @ryanatkn/fuz
  • complements the modern web platform, drops legacy quickly
  • kinda minimal in many ways but also not, treeshakes well

usage

npm i -D @ryanatkn/belt

// import full module paths:
import {type Result, unwrap} from '@ryanatkn/belt/result.js';
import {random_int} from '@ryanatkn/belt/random.js';

docs are a work in progress - see the available modules at belt.ryanatkn.com and /src/routes/package.ts, I recommend reading the source code for now or asking an AI

build

npm run build
# or
gro build

test

For more see uvu and Gro's test docs.

gro test
gro test filepattern1 filepatternB
gro test -- uvu --forwarded_args 'to uvu'

deploy

Deploy (build, commit, and push) to the deploy branch, e.g. for GitHub Pages:

npm run deploy
# or
gro deploy

credits 🐒🐒🐒

My sister Lisa helped me with the logo - instagram.com/lisaeatkinson - she's a designer and currently looking for work

license 🐦

MIT