Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lowlighter/libs

๐Ÿฑ Collection of carefully crafted TypeScript standalone libraries. Minimal, unbloated, convenient.
https://github.com/lowlighter/libs

algorithms bun bundler deno diff formatter logging-library minifier nodejs parser patiencediff qrcode-generator reactivity stringifier totp-generator typescript typescript-library typings xml

Last synced: 29 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# ๐Ÿฑ Libraries

[![JSR Scope](https://jsr.io/badges/@libs)](https://jsr.io/@libs) [![NPM](https://img.shields.io/badge/npm-%40lowlighter-0a3040?style=flat&logo=npm&labelColor=cb0000)](https://www.npmjs.com/search?q=@lowlighter)
[![deno.land/x](https://img.shields.io/badge/deno.land%2Fx-libs-0a3040?style=flat&logo=deno&labelColor=black)](https://deno.land/x/libs) [![Playground](https://img.shields.io/badge/Playground--black?style=flat&logo=windowsterminal&labelColor=black)](https://libs.lecoq.io)
[![ci](https://github.com/lowlighter/libs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/lowlighter/libs/actions/workflows/ci.yml)

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

They honor [web standards](https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/The_web_and_web_standards) for maximum compatibility cross-runtime, which makes most of them compatible with [Deno](https://deno.com), [Node.js](https://nodejs.org),
[Bun](https://bun.sh) and even browsers out of the box.

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

๐Ÿ“ฆ @libs/bundle

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





๐Ÿงฎ @libs/crypto

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





โž• @libs/diff

Diff (patience algorithm)
Metadata and compatibilityFeatures





  • Compute unified patch between two strings





๐ŸฆŠ @libs/dom

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







๐Ÿ“ฐ @libs/logger

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)





๐Ÿ–จ๏ธ @libs/markdown

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.)







๐Ÿ’ฐ @libs/orm

Object-relational mapping toolbox.
Metadata and compatibilityFeatures





  • Manage resources using an agnostic storage inteface





๐Ÿ”ณ @libs/qrcode

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)





๐ŸŽฏ @libs/reactive

Reactive utilities for observable objects.
Metadata and compatibilityFeatures





  • Create observable contexts to track get, set, delete and call operations

  • Support inherited contexts





โฏ๏ธ @libs/run

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)





๐Ÿฆ• @libs/std

All-in-one mirror of Deno's Standard Library.
Metadata and compatibilityFeatures








๐Ÿงช @libs/testing

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





๐Ÿงฐ @libs/typing

Utility types.
Metadata and compatibilityFeatures





  • Utility types such as Promisable, Nullable, MapKey, MapValue, SetValue, etc.

  • Functions constructors (AsyncFunction, GeneratorFunction, AsyncGeneratorFunction)





๐Ÿ“ƒ @libs/xml

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](https://semver.org) 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](https://github.com/lowlighter/matcha).

```sh
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](https://deno.land/x) (webhooks must be configured beforehand).

```sh
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.

```sh
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.

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

### Web assembly builder

Compile a Rust project to Web assembly and minify output.

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

## ๐Ÿฆฎ Contributing

Contributions are welcome!
Please read our [contribution guide](https://github.com/lowlighter/libs/blob/main/CONTRIBUTING.md) first.

## ๐Ÿ“œ License

This work is licensed under the [MIT License](./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`](https://github.com/sponsors/lowlighter), even one-time contributions are greatly appreciated!