eXtremely Useful Tool Libraries

tiny packages that give you just the right tool and no more

Follow me on GitHub

@xutl - Xtra Useful Tool Libraries

Packages and modules are most useful if they do one thing and only that one thing. These are a grouo of extremely useful packages in that they do just one thing and don’t try to be everything to everyone.

@xutl/defer

Simple library to facilitate using the defer pattern, which makes working with promises much easier for certain circumstances.

Includes:

  • callback conversion
  • timeout handling
  • tagging
  • full typescript support

See @xutl/defer documentation.

@xutl/queue

Library to provide async iterable queues. A async iterable queue is something that you can push something onto (such as data that comes in on events) and that you can also async iterate over using for await (let item of queue).

See @xutl/queue documentation.

@xutl/events

One eXtremely Useful Tool Library to provide async events. The event handler is allowed to return a Promise and event emitting will wait for that Promise to complete before continuing on to the next event handler. .emit also returns a Promise which will resolve when all handlers have completed.

See @xutl/events documentation.

@xutl/istream

Library to wrap EventEmitter and ReadableStream to return an AyncIterable. Very useful for reading files line by line or iterating over events.

See @xutl/istream documentation.

@xutl/aim

Simple library to facilitate using async iterators.

See @xutl/aim documentation.

@xutl/json

Parsing JSON with comments and reading/writing JSON files.

See @xutl/json documentation.

@xutl/crypto

A wrapper around the crypto module that makes working with cryptography a bit easier.

See @xutl/crypto documentation.

@xutl/logline

A simple tool to format log-lines. Also capable of parsing them back and forwarding them via UDP.

See @xutl/logline documentation.

@xutl/abort

A simple tool to facilitate using AbortController patterns work with async constructs.

See @xutl/abort documentation.

@xutl/test

A simple and small test-framework for node stuff that’s basically half of Mocha. The half it doesn’t support is configurability and coverage, since those are easy to add with separate tools.

See @xutl/test documentation.

@xutl/test-modules

A simple way to replace module dependencies with mocks.

See @xutl/test-modules documentation.

@xutl/test-timers

An easy way to mock timers useful for testing, when timers should be intercepted and manually advanced.

See @xutl/test-timers documentation.

@xutl/version

An easy way to manage the version of package.json

See @xutl/version documentation.

@xutl/release

Easy way to handle creating github releases.

See @xutl/release documentation.

@xutl/pack

Easy way to package up files and have a way to random access them in the archive

See @xutl/pack documentation.

@xutl/args

Simple argument parser for CLI programs

See @xutl/args documentation.

@xutl/cmd

Simple sub-command executor for CLI programs

See @xutl/cmd documentation.