Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/lowlighter/libs
- Owner: lowlighter
- License: mit
- Created: 2021-05-04T22:18:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-22T21:46:42.000Z (6 months ago)
- Last Synced: 2024-05-23T04:30:36.418Z (6 months ago)
- Topics: algorithms, bun, bundler, deno, diff, formatter, logging-library, minifier, nodejs, parser, patiencediff, qrcode-generator, reactivity, stringifier, totp-generator, typescript, typescript-library, typings, xml
- Language: TypeScript
- Homepage: https://jsr.io/@libs
- Size: 648 KB
- Stars: 73
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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.
Code bundlers, formatters, minifiers and others tools.
๐ฆ @libs/bundle
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
- Publish deno packages easily back to NPM registries and deno.land/x
- Publish deno packages easily back to NPM registries and deno.land/x
- 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 aroundDeno.Command
with improved streams managements
- Add
stdio
that register eachstdin
,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 tostdin
for interactive scripting
- Add
- 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
- All-in-one mirror of Deno's Standard Library.
๐งช @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!