0.8.1 • Published 2 years ago

@feltjs/util v0.8.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@feltjs/util

JS utilities to complement the modern web platform 🦕🐋 util.felt.dev

design:

  • kitchen-sink utilities library (sorry, we wish it weren't so, JS made us do it)
  • mix of JS module environments - browser-only, Node-only, universal
  • mostly small, pure functions
  • near-zero non-platform third party dependencies, currently the one exception is kleur
  • all TypeScript, no Svelte or SvelteKit
  • complement the modern web platform, stay evergreen
  • kinda minimal in many ways but also not

usage

npm i -D @feltjs/util

// import anything from the root, except the modules that rely on Node-only dependencies -
// see $lib/index.ts for more
import {type Result, unwrap, randomInt} from '@feltjs/util';

// or import full module paths:
import {type Result, unwrap} from '@feltjs/util/result.js';
import {randomInt} from '@feltjs/util/random.js';

// these aren't exported from the root:
import {toPathStem} from '@feltjs/util/path.js';
import {spawn} from '@feltjs/util/process.js';

see the available modules at util.felt.dev, 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 SvelteSvelteKitViteesbuilduvuTypeScriptESLintPrettierFeltUIGro & more

license 🐦

MIT

0.8.1

2 years ago

0.8.0

2 years ago

0.7.5

2 years ago

0.7.2

2 years ago

0.7.4

2 years ago

0.7.3

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago