@ryanatkn/belt

0.20.10 • Public • Published

@ryanatkn/belt

utility belt for JS 🦕 belt.ryanatkn.com

design:

  • 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
  • one third party dependency on kleur
  • 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';

see the available modules at belt.ryanatkn.com, src/lib/index.ts, and src/lib/exports.ts

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 🐢🐢🐢

depends on kleur

made with SvelteSvelteKitViteesbuilduvuTypeScriptESLintPrettierFuzGro and more

license 🐦

MIT

Package Sidebar

Install

npm i @ryanatkn/belt

Weekly Downloads

84

Version

0.20.10

License

MIT

Unpacked Size

116 kB

Total Files

91

Last publish

Collaborators

  • ryanatkn