Skip to content

๐Ÿฑ Collection of carefully crafted TypeScript standalone libraries. Minimal, unbloated, convenient.

License

Notifications You must be signed in to change notification settings

lowlighter/libs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฑ Libraries

JSR Scope NPM deno.land/x Playground ci

This is a collection of carefully crafted TypeScript libraries. They try to be as minimal, unbloated and convenient as possible.

They honor web standards for maximum compatibility cross-runtime, which makes most of them compatible with Deno, Node.js, Bun and even browsers out of the box.

See table below for a list of available libraries and their features, compatibility, test coverage and playgrounds.

Code bundlers, formatters, minifiers and others tools.
Metadata and compatibilityFeatures
  • Lint, minify, license CSS code and check features compatibility against MDN data for each browser
  • Bundle, minify, anonymize local file paths, unmap imports, license and publish TypeScript code
  • Compile Rust projects to Web assembly, hot-patch source in base64 and minify output
  • CLI utilities
Features based upon Web Crypto APIs
Metadata and compatibilityFeatures
  • Encrypt and decrypt data using a seed-salt derived private key
  • Generate time-based OTP secret key and verify tokens validity
Diff (patience algorithm)
Metadata and compatibilityFeatures
  • Compute unified patch between two strings
Virtual DOM for unit testing and server side rendering.
Metadata and compatibilityFeatures
  • Implements typings from `lib.dom.d.ts` while following web standards
  • Reuse built-ins whenever possible
  • Ideal for:
    • Server-Side Rendering
    • Unit testing for browser support
    • HTML parsing and scraping
Simple logger
Metadata and compatibilityFeatures
  • Simple logger library with configurable log level and tags
    • Support date, time and delta stamps
    • Support caller info (file, name, line) using internal V8's Error.prepareStackTrace API
  • Automatically reads LOG_LEVEL environment variable (if available)
Markdown renderer with optional plugins based on the unified ecosystem.
Metadata and compatibilityFeatures
  • Render markdown to HTML using the unified ecosystem.
    • Straightforward API for both basic markdown and extended markdown rendering
    • Offer a dozen of plugins to add extended markdown features (headings anchors, frontmatter, code highlighting, math, mermaid diagrams, wiki links, etc.)
Object-relational mapping toolbox.
Metadata and compatibilityFeatures
  • Manage resources using an agnostic storage inteface
Pure TypeScript QRcode generator with no dependencies.
Metadata and compatibilityFeatures
  • Generate QR codes without external dependencies
  • Support console, array and SVG output (with customizable colors)
Reactive utilities for observable objects.
Metadata and compatibilityFeatures
  • Create observable contexts to track get, set, delete and call operations
  • Support inherited contexts
Utilities to run subprocess.
Metadata and compatibilityFeatures
  • Wrapper around Deno.Command with improved streams managements
    • Add stdio that register each stdin, stdout, stderr entry with a timestamp for an accurate history
    • Support buffering to merge closely-timed entries from same channel together
    • Pass a callback to react on output chanells and write to stdin for interactive scripting
  • Support winext to append an extension to binary when on Windows (e.g. .cmd, .exe, etc.)
  • Support dryrun to skip command execution (useful for test environments)
All-in-one mirror of Deno's Standard Library.
Metadata and compatibilityFeatures
Testing utilities for cross-platform testing on Deno, Node.js and Bun.
Metadata and compatibilityFeatures
  • Cross-runtime testing framework
    • Support deno natively
    • Support Node.js through npx tsx --test
    • Support bun through bun test
    • Note: although tests are run on multiple runtimes, this library must be run on deno
  • Automatically skip test cases when runtime is not available on current platform
Utility types.
Metadata and compatibilityFeatures
  • Utility types such as Promisable, Nullable, MapKey, MapValue, SetValue, etc.
  • Functions constructors (AsyncFunction, GeneratorFunction, AsyncGeneratorFunction)
XML parser/stringifier with no dependencies.
Metadata and compatibilityFeatures
  • Parse XML to JavaScript object
    • Support cleaning options to remove attributes, comments, XML doctype and processing instructions from output
    • Support flatten options to flatten node content when only attributes, text or nothing is present
    • Support reviving options to trim text, replace XML entities, revive booleans and numbers
    • Also support custom reviving function
  • Stringify JavaScript object to XML
    • Support formatting options to configure indentation and text break lines
    • Support replacing options to replace XML entities
    • Also support custom replacing function

Each package is versioned independently. Releases are fully automated and are published on every push to the main branch. Versioning follows SemVer rules.

๐Ÿง‘โ€๐Ÿ’ป CLI Utilities

We also provide a set of useful CLI scripts.

Warning

Please note that these only run on the Deno runtime.

TypeScript code coverage enhancer

Enhance coverage reports generated with deno coverage by adding syntax highlighting and better styling using matcha.css.

deno run jsr:@libs/bundle/ts/cli/coverage --help

TypeScript package publisher

Publish a TypeScript package to an npm registry (transpilation to JavaScript and conversion from deno.jsonc to package.json will automatically be performed) or to deno.land/x (webhooks must be configured beforehand).

deno run jsr:@libs/bundle/ts/cli/publish --help

CSS formatter

Format CSS code similarly to prettier or deno fmt. Use --check to validate that CSS code is correctly formatted.

deno run jsr:@libs/bundle/css/cli/fmt --help

CSS features compatibility checker

Print compatibility report for CSS features against MDN data for selected browsers.

deno run jsr:@libs/bundle/css/cli/check --help

Web assembly builder

Compile a Rust project to Web assembly and minify output.

deno run jsr:@libs/bundle/wasm/cli/build --help

๐Ÿฆฎ Contributing

Contributions are welcome! Please read our contribution guide first.

๐Ÿ“œ License

This work is licensed under the MIT License.

If you include a significant part of it in your own project, you must keep the license notice with it, including the mention of the additional original authors if any.

Tip

Love these bytes? Consider ๐Ÿ’ sponsoring me, even one-time contributions are greatly appreciated!