Skip to content

Latest commit

 

History

History
73 lines (52 loc) · 2.05 KB

README.md

File metadata and controls

73 lines (52 loc) · 2.05 KB

@ryanatkn/belt

a green sauropod wearing a brown utility belt

utility belt for JS 🦕 ancient not extinct

belt.ryanatkn.com

design:

  • kitchen-sink utilities library - sorry, I wish it weren't so, JS made me do it
  • one optional runtime dependency on esm-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 @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