Skip to content

jefri/jiffies

Repository files navigation

Jiffies

JEFRi Jiffies are a number of "common" utilities for JavaScript/TypeScript pulled from and inspired by other programming languages, and common base tools missing or inconsistent between DOM and Node runtimes.

  • assert - common runtime assertions.
  • context - JavaScript implementation of the Python [with][pywith] statement.
  • display - TypeScript implementation of the Rust [Display][rustdisplay] trait.
  • equal - JavaScript deep equality checkers, including TS type checking.
  • flags - JavaScript flag, environment, and configuration loader.
  • log - JavaScript implementation of a [log4j][log4j]-alike logger.
  • result - JavaScript implementation of Rust's [Option][rustoption] and [Result][rustresult] types.
  • loader.mjs - Node 16.x typescript-transpiling module loader.

Jiffies also includes several microframeworks.

  • dom - a tiny DOM functional library.
  • pico - a copy of PicoCSS.
  • scope - JavaScript testing microframework.
  • server - Node HTTP Server & middleware.

Development

  1. Clone jiffies
  2. cd jiffies
  3. npm install
  4. npm link

After any edit

  1. npm run build

Alternatively, in a background terminal

  1. npm run watch &

Apps

Starting

  1. Create app folder
  2. npm init
  3. npm install -D prettier typescript@next
  4. npm link @jefri/jiffies

Running

  1. npm start