Awesome Lists

awesome-tiny-js

by thoughtspile

awesome listJavaScriptpushed about 2 years ago

šŸ¤ A collection of tiny JS libraries (under 2 kB) to put your bundle on a diet

AI summary

Bundle trimmer

A collection of tiny JavaScript libraries to help reduce bundle size

stars
705
forks
12
watching
15
awesome list
1
entries
79
View on GitHub

Embed the badge

Show how many awesome lists link to your project. The count updates automatically.

Awesome Lists badge
Markdown
[![Awesome Lists Badge](https://awesome.facts.dev/shield/thoughtspile/awesome-tiny-js/links.svg)](https://awesome.facts.dev/awesome/thoughtspile/awesome-tiny-js)
HTML
<a href="https://awesome.facts.dev/awesome/thoughtspile/awesome-tiny-js"><img src="https://awesome.facts.dev/shield/thoughtspile/awesome-tiny-js/links.svg" alt="Awesome Lists Badge" /></a>
Image URL
https://awesome.facts.dev/shield/thoughtspile/awesome-tiny-js/links.svg

What's in the list

79 links in 16 sections, with live GitHub stats.activeno commit in 2y

UI Frameworks

  • preact

    React-like API (pre-hooks). Cool ecosystem of similarly tiny tools and components. Highly recommended

  • hyperapp

    vDOM framework with pure JS syntax and immutable state,

  • redom

    Hyperapp-style templates with event listeners and updates,

  • fre

    React-like library with hooks and concurrency,

  • van

    vDOM-based framework optimized for no-build setups,

  • superfine

    Hyperapp with state & effect hooks removed,

  • arrowjs

    Tagged templates + reactive data,

  • umbrella

    jQuery-style DOM manipulation library,

Event Emitters

  • mitt

    Plain event emitter that I use on most projects,

  • nanoevents

    Nicer unsubscribe API, but no event,

  • onfire.js

    Also has method,

State Managers

  • zustand

    Simple stores with pleasant actions and selectors. Vanilla , React

  • nanostores

    Modular store with good tree-shaking support, vanilla, + React extra. Supports all the top frameworks

  • exome

    Atomic stores with lots of framework connectors, + React extra. Supports all the top frameworks

  • storeon

    Minimal redux-styled store with lots of framework connectors, . React extra + Vue, Svelte, Angular

  • unistore

    Centralized store with actions, + React

  • teaful

    Store with useState-like API, , including React / preact connector

State Managers / Signals

  • @preact/signals

    The OG signals from preact core, with react integration

  • usignal

    A smaller signal implementation,

  • hyperactiv

    4 functions to make objects observable and listen to changes,

  • flimsy

    Signals from Solid (it fit into UI frameworks category itself). Author warning:

State Managers / Reactive Programming

  • flyd

    Rx-styled event streams,

  • callbag-basics

    Rx-style event streams,

Routers and URL Utils

  • wouter

    Declarative router for React / preact, , also available as a standalone hook:

  • @nanostores/router

    Routes as a nanostores store (framework-agnostic),

  • navaid

    History-based observable router,

  • matchit

    Route parser and matcher in

  • regexparam

    Convert path to regexp in

  • qss

    Parse querystrings in . Not sure you need it, support is good

API Layer

  • redaxios

    Drop-in axios replacement for modern browsers,

  • wretch

    Chainable API with error processing and lots of extra plugins,

  • gretchen

    Chainable API with type-safe errors,

  • unfetch

    Loose fetch polyfill,

I18N

  • @nanostores/i18n

    Detect locale, load dictionaries, format dates / numbers, including nanostores

  • eo-locale

    Interpolation and dates / numbers, , or with react bindings

  • rosetta

    Bare-bones template strings ( ) and custom functions for everyting else,

  • lingui

    Small core with template strings,

Dates and Time

  • date-fns

    Not tiny as a whole, but are under 1 kB each (format and parse are quite heavy)

  • dayjs

    moment.js-compatible API, covers most use cases,

  • tinytime

    Simple date / time formatter: ,

  • tinydate

    Date / time formatter, only supports padded numeric output ( ),

  • time-stamp

    More of the same,

  • ms

    Parse & format ms durations, e.g. ,

  • timeago.js

    Format dates into stuff like or

  • fromnow

    More of the same,

Generic Utilities

  • remeda

    90 tree-shakable helpers

  • rambda

    187 tree-shakable helpers

  • just

    82 helpers in separate packages

  • @fxts/core

    96 tree-shakable helpers. Lazy evaluation support

Validation

  • v8n

    zod-style API with fine-grained checks: . No tree shaking,

  • banditypes

    The smallest validation library:

  • superstruct

    The most popular modular validation library with good tree-shaking,

  • valibot

    Another modular validation library,

  • deep-waters

    Composable functional validators,

Unique ID Generation

  • @lukeed/uuid

    Real UUIDs,

  • nanoid

    Random IDs with larger alphabet,

  • uid

    More of the same,

  • hexoid

    Hexadecimal IDs,

Colors

  • colord

    Manipulate colors and convert between spaces, . Extra features come as plugins, 150b to 1.5 kB each

  • colr

    More of the same,

  • polychrome

    More of the same,

  • randomcolor

    Attractive random colors with configuration

Touch Gestures

  • alloyfinger

    Pan, swipe, tap, doubletap, longpress, pinch / rotate. My personal favorite.

  • tinygesture

    Configurable pan, swipe, tap, doubletap, longpress.

  • pointer-tracker

    Unified interface for mouse, touch and pointer events,

  • detect-it

    Detect present and primary input method (touch / mouse) and supported events,

  • js-search

    Feature-rich and customizable: multi-field indices, stop words, custom stemmers and tokenizers

  • ndx

    Similar to js-search, differs in and is less strict for multi-word queries . Supports field weights

  • wade

    Also similar,

  • libsearch

    Index-free search (slower, but easier to use) with sane ordering

  • fuzzy

    Index-free, can highlight matches

  • fuzzy-search

    With stateful index

  • fzy.js

    Matches one string at a time, tree-shakeable scores and match highlighting. total, or ~150 bytes for only

  • fuzzysearch

    One string at a time, does not compute score / rank

  • liquidmetal

    Quicksilver algorithm, prioritizes matches at start of word for command abbreviations (e.g. -> ). One string at a time

  • quick-score

    Another quicksilver-based lib, tweaked for long strings. Built-in list filtering and sorting, or 1.2 kB for single-string scoring

  • fuzzyset

    Find misspellings, e.g. missipissi -> Missisipi, Commercial usage costs $42

More related projects

Add a GitHub project

Missing a project or an awesome list? Paste its GitHub URL and we fetch it right away.