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: 4 months ago
Linked from 1 awesome list

awesomeawesome-listjavascripttinytypescript

Awesome Tiny JS / UI Frameworks

preact 36,957 about 1 month ago React-like API (pre-hooks). Cool ecosystem of similarly tiny tools and components. Highly recommended
hyperapp 19,091 3 months ago vDOM framework with pure JS syntax and immutable state,
redom 3,427 about 1 month ago Hyperapp-style templates with event listeners and updates,
fre 3,720 10 months ago React-like library with hooks and concurrency,
van 3,927 about 1 month 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 8 months ago Tagged templates + reactive data,
umbrella 2,303 4 months ago jQuery-style DOM manipulation library,

Awesome Tiny JS / Event Emitters

mitt 10,947 5 months ago Plain event emitter that I use on most projects,
nanoevents 1,498 about 1 month ago Nicer unsubscribe API, but no event,
onfire.js 499 over 5 years ago Also has method,

Awesome Tiny JS / State Managers

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

Awesome Tiny JS / State Managers / Signals

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

Awesome Tiny JS / State Managers / Reactive Programming

flyd 1,562 12 months ago Rx-styled event streams,
callbag-basics 1,652 over 1 year ago Rx-style event streams,

Awesome Tiny JS / Routers and URL Utils

wouter 6,813 4 months ago Declarative router for React / preact, , also available as a standalone hook:
@nanostores/router 247 3 months ago Routes as a nanostores store (framework-agnostic),
navaid 783 12 months ago History-based observable router,
matchit 322 about 3 years ago Route parser and matcher in
regexparam 570 about 1 year ago Convert path to regexp in
qss 446 almost 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 about 1 month 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 6 months ago Detect locale, load dictionaries, format dates / numbers, including nanostores
eo-locale 348 about 1 month ago Interpolation and dates / numbers, , or with react bindings
rosetta 790 12 months ago Bare-bones template strings ( ) and custom functions for everyting else,
lingui 4,746 about 1 month ago Small core with template strings,

Awesome Tiny JS / Dates and Time

date-fns 35,034 4 months ago Not tiny as a whole, but are under 1 kB each (format and parse are quite heavy)
dayjs 47,165 about 2 months ago moment.js-compatible API, covers most use cases,
tinytime 1,338 about 2 years ago Simple date / time formatter: ,
tinydate 1,065 12 months ago Date / time formatter, only supports padded numeric output ( ),
time-stamp 111 about 4 years ago More of the same,
ms 5,178 5 months ago Parse & format ms durations, e.g. ,
timeago.js 5,334 6 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 about 1 month ago 90 tree-shakable helpers
rambda 1,665 about 1 month ago 187 tree-shakable helpers
just 6,074 11 months ago 82 helpers in separate packages
@fxts/core 940 about 2 months ago 96 tree-shakable helpers. Lazy evaluation support

Awesome Tiny JS / Validation

v8n 4,170 4 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 4 months ago The most popular modular validation library with good tree-shaking,
valibot 6,436 about 1 month ago Another modular validation library,
deep-waters 200 about 2 years ago Composable functional validators,

Awesome Tiny JS / Unique ID Generation

@lukeed/uuid 397 4 months ago Real UUIDs,
nanoid 24,781 about 1 month ago Random IDs with larger alphabet,
uid 657 4 months ago More of the same,
hexoid 195 3 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 over 4 years ago More of the same,
polychrome 288 almost 7 years ago More of the same,
randomcolor 6,097 11 months 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 about 1 year ago Configurable pan, swipe, tap, doubletap, longpress.
pointer-tracker 186 4 months ago Unified interface for mouse, touch and pointer events,
detect-it 419 over 3 years ago Detect present and primary input method (touch / mouse) and supported events,
js-search 2,215 over 1 year 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 over 1 year ago Also similar,
libsearch 163 over 2 years ago Index-free search (slower, but easier to use) with sane ordering
stemmer 128 about 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 4 months ago Matches one string at a time, tree-shakeable scores and match highlighting. total, or ~150 bytes for only
fuzzysearch 2,715 over 1 year 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: