awesome-tiny-js

Bundle trimmer

A collection of tiny JavaScript libraries to help reduce bundle size

🤏 A collection of tiny JS libraries (under 2 kB) to put your bundle on a diet

GitHub

705 stars
15 watching
12 forks
Language: JavaScript
last commit: 6 months ago
Linked from 1 awesome list

awesomeawesome-listjavascripttinytypescript

Awesome Tiny JS / UI Frameworks

preact 36,957 3 months ago React-like API (pre-hooks). Cool ecosystem of similarly tiny tools and components. Highly recommended
hyperapp 19,091 5 months ago vDOM framework with pure JS syntax and immutable state,
redom 3,427 3 months ago Hyperapp-style templates with event listeners and updates,
fre 3,720 11 months ago React-like library with hooks and concurrency,
van 3,927 3 months ago vDOM-based framework optimized for no-build setups,
superfine 1,597 over 2 years ago Hyperapp with state & effect hooks removed,
arrowjs 2,422 10 months ago Tagged templates + reactive data,
umbrella 2,303 5 months ago jQuery-style DOM manipulation library,

Awesome Tiny JS / Event Emitters

mitt 10,947 7 months ago Plain event emitter that I use on most projects,
nanoevents 1,498 3 months ago Nicer unsubscribe API, but no event,
onfire.js 499 almost 6 years ago Also has method,

Awesome Tiny JS / State Managers

zustand 48,670 3 months ago Simple stores with pleasant actions and selectors. Vanilla , React
nanostores 5,539 6 months ago Modular store with good tree-shaking support, vanilla, + React extra. Supports all the top frameworks
exome 241 3 months ago Atomic stores with lots of framework connectors, + React extra. Supports all the top frameworks
storeon 1,977 3 months ago Minimal redux-styled store with lots of framework connectors, . React extra + Vue, Svelte, Angular
unistore 2,858 almost 4 years ago Centralized store with actions, + React
teaful 713 over 2 years ago Store with useState-like API, , including React / preact connector

Awesome Tiny JS / State Managers / Signals

@preact/signals 3,849 3 months ago The OG signals from preact core, with react integration
usignal 224 5 months ago A smaller signal implementation,
hyperactiv 440 5 months ago 4 functions to make objects observable and listen to changes,
flimsy 189 about 1 year ago Signals from Solid (it fit into UI frameworks category itself). Author warning:

Awesome Tiny JS / State Managers / Reactive Programming

flyd 1,562 about 1 year ago Rx-styled event streams,
callbag-basics 1,652 almost 2 years ago Rx-style event streams,

Awesome Tiny JS / Routers and URL Utils

wouter 6,813 5 months ago Declarative router for React / preact, , also available as a standalone hook:
@nanostores/router 247 5 months ago Routes as a nanostores store (framework-agnostic),
navaid 783 about 1 year ago History-based observable router,
matchit 322 over 3 years ago Route parser and matcher in
regexparam 570 over 1 year ago Convert path to regexp in
qss 446 about 2 years ago Parse querystrings in . Not sure you need it, support is good

Awesome Tiny JS / API Layer

redaxios 4,727 over 1 year ago Drop-in axios replacement for modern browsers,
wretch 4,855 3 months ago Chainable API with error processing and lots of extra plugins,
gretchen 331 over 1 year ago Chainable API with type-safe errors,
unfetch 5,708 over 1 year ago Loose fetch polyfill,

Awesome Tiny JS / I18N

@nanostores/i18n 231 7 months ago Detect locale, load dictionaries, format dates / numbers, including nanostores
eo-locale 348 3 months ago Interpolation and dates / numbers, , or with react bindings
rosetta 790 about 1 year ago Bare-bones template strings ( ) and custom functions for everyting else,
lingui 4,746 3 months ago Small core with template strings,

Awesome Tiny JS / Dates and Time

date-fns 35,034 6 months ago Not tiny as a whole, but are under 1 kB each (format and parse are quite heavy)
dayjs 47,165 4 months ago moment.js-compatible API, covers most use cases,
tinytime 1,338 about 2 years ago Simple date / time formatter: ,
tinydate 1,065 about 1 year ago Date / time formatter, only supports padded numeric output ( ),
time-stamp 111 over 4 years ago More of the same,
ms 5,178 6 months ago Parse & format ms durations, e.g. ,
timeago.js 5,334 8 months ago Format dates into stuff like or
fromnow 190 over 5 years ago More of the same,

Awesome Tiny JS / Generic Utilities

remeda 4,613 3 months ago 90 tree-shakable helpers
rambda 1,665 3 months ago 187 tree-shakable helpers
just 6,074 about 1 year ago 82 helpers in separate packages
@fxts/core 940 4 months ago 96 tree-shakable helpers. Lazy evaluation support

Awesome Tiny JS / Validation

v8n 4,170 6 months ago zod-style API with fine-grained checks: . No tree shaking,
banditypes 170 over 1 year ago The smallest validation library:
superstruct 7,043 5 months ago The most popular modular validation library with good tree-shaking,
valibot 6,436 3 months ago Another modular validation library,
deep-waters 200 about 2 years ago Composable functional validators,

Awesome Tiny JS / Unique ID Generation

@lukeed/uuid 397 6 months ago Real UUIDs,
nanoid 24,781 3 months ago Random IDs with larger alphabet,
uid 657 6 months ago More of the same,
hexoid 195 5 months ago Hexadecimal IDs,

Awesome Tiny JS / Colors

colord 1,702 over 1 year ago Manipulate colors and convert between spaces, . Extra features come as plugins, 150b to 1.5 kB each
colr 105 almost 5 years ago More of the same,
polychrome 288 about 7 years ago More of the same,
randomcolor 6,097 about 1 year ago Attractive random colors with configuration

Awesome Tiny JS / Touch Gestures

alloyfinger 3,432 about 6 years ago Pan, swipe, tap, doubletap, longpress, pinch / rotate. My personal favorite.
tinygesture 211 over 1 year ago Configurable pan, swipe, tap, doubletap, longpress.
pointer-tracker 186 6 months ago Unified interface for mouse, touch and pointer events,
detect-it 419 almost 4 years ago Detect present and primary input method (touch / mouse) and supported events,
js-search 2,215 almost 2 years ago Feature-rich and customizable: multi-field indices, stop words, custom stemmers and tokenizers
ndx 153 almost 2 years ago Similar to js-search, differs in and is less strict for multi-word queries . Supports field weights
wade 2,979 almost 2 years ago Also similar,
libsearch 163 over 2 years ago Index-free search (slower, but easier to use) with sane ordering
stemmer 128 over 2 years ago -
porter-stemmer 100 over 4 years ago -
fuzzy 832 about 3 years ago Index-free, can highlight matches
fuzzy-search 226 almost 2 years ago With stateful index
fzy.js 152 6 months ago Matches one string at a time, tree-shakeable scores and match highlighting. total, or ~150 bytes for only
fuzzysearch 2,715 almost 2 years ago One string at a time, does not compute score / rank
liquidmetal 296 over 4 years ago Quicksilver algorithm, prioritizes matches at start of word for command abbreviations (e.g. -> ). One string at a time
quick-score 159 about 2 years ago Another quicksilver-based lib, tweaked for long strings. Built-in list filtering and sorting, or 1.2 kB for single-string scoring
fuzzyset 1,371 about 3 years ago Find misspellings, e.g. missipissi -> Missisipi, Commercial usage costs $42

Backlinks from these awesome lists:

More related projects: