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: almost 2 years ago
Linked from 1 awesome list

awesomeawesome-listjavascripttinytypescript

Awesome Tiny JS / UI Frameworks

preact36,957almost 2 years agoReact-like API (pre-hooks). Cool ecosystem of similarly tiny tools and components. Highly recommended
hyperapp19,091almost 2 years agovDOM framework with pure JS syntax and immutable state,
redom3,427over 1 year agoHyperapp-style templates with event listeners and updates,
fre3,720over 2 years agoReact-like library with hooks and concurrency,
van3,927over 1 year agovDOM-based framework optimized for no-build setups,
superfine1,597about 4 years agoHyperapp with state & effect hooks removed,
arrowjs2,422over 2 years agoTagged templates + reactive data,
umbrella2,303almost 2 years agojQuery-style DOM manipulation library,

Awesome Tiny JS / Event Emitters

mitt10,947about 2 years agoPlain event emitter that I use on most projects,
nanoevents1,498almost 2 years agoNicer unsubscribe API, but no event,
onfire.js499over 7 years agoAlso has method,

Awesome Tiny JS / State Managers

zustand48,670over 1 year agoSimple stores with pleasant actions and selectors. Vanilla , React
nanostores5,539about 2 years agoModular store with good tree-shaking support, vanilla, + React extra. Supports all the top frameworks
exome241almost 2 years agoAtomic stores with lots of framework connectors, + React extra. Supports all the top frameworks
storeon1,977almost 2 years agoMinimal redux-styled store with lots of framework connectors, . React extra + Vue, Svelte, Angular
unistore2,858over 5 years agoCentralized store with actions, + React
teaful713almost 4 years agoStore with useState-like API, , including React / preact connector

Awesome Tiny JS / State Managers / Signals

@preact/signals3,849over 1 year agoThe OG signals from preact core, with react integration
usignal224almost 2 years agoA smaller signal implementation,
hyperactiv440almost 2 years ago4 functions to make objects observable and listen to changes,
flimsy189over 2 years agoSignals from Solid (it fit into UI frameworks category itself). Author warning:

Awesome Tiny JS / State Managers / Reactive Programming

flyd1,562over 2 years agoRx-styled event streams,
callbag-basics1,652over 3 years agoRx-style event streams,

Awesome Tiny JS / Routers and URL Utils

wouter6,813almost 2 years agoDeclarative router for React / preact, , also available as a standalone hook:
@nanostores/router247almost 2 years agoRoutes as a nanostores store (framework-agnostic),
navaid783over 2 years agoHistory-based observable router,
matchit322almost 5 years agoRoute parser and matcher in
regexparam570almost 3 years agoConvert path to regexp in
qss446over 3 years agoParse querystrings in . Not sure you need it, support is good

Awesome Tiny JS / API Layer

redaxios4,727about 3 years agoDrop-in axios replacement for modern browsers,
wretch4,855almost 2 years agoChainable API with error processing and lots of extra plugins,
gretchen331almost 3 years agoChainable API with type-safe errors,
unfetch5,708about 3 years agoLoose fetch polyfill,

Awesome Tiny JS / I18N

@nanostores/i18n231about 2 years agoDetect locale, load dictionaries, format dates / numbers, including nanostores
eo-locale348almost 2 years agoInterpolation and dates / numbers, , or with react bindings
rosetta790over 2 years agoBare-bones template strings ( ) and custom functions for everyting else,
lingui4,746over 1 year agoSmall core with template strings,

Awesome Tiny JS / Dates and Time

date-fns35,034almost 2 years agoNot tiny as a whole, but are under 1 kB each (format and parse are quite heavy)
dayjs47,165almost 2 years agomoment.js-compatible API, covers most use cases,
tinytime1,338over 3 years agoSimple date / time formatter: ,
tinydate1,065over 2 years agoDate / time formatter, only supports padded numeric output ( ),
time-stamp111almost 6 years agoMore of the same,
ms5,178about 2 years agoParse & format ms durations, e.g. ,
timeago.js5,334about 2 years agoFormat dates into stuff like or
fromnow190about 7 years agoMore of the same,

Awesome Tiny JS / Generic Utilities

remeda4,613over 1 year ago90 tree-shakable helpers
rambda1,665almost 2 years ago187 tree-shakable helpers
just6,074over 2 years ago82 helpers in separate packages
@fxts/core940almost 2 years ago96 tree-shakable helpers. Lazy evaluation support

Awesome Tiny JS / Validation

v8n4,170almost 2 years agozod-style API with fine-grained checks: . No tree shaking,
banditypes170about 3 years agoThe smallest validation library:
superstruct7,043almost 2 years agoThe most popular modular validation library with good tree-shaking,
valibot6,436almost 2 years agoAnother modular validation library,
deep-waters200over 3 years agoComposable functional validators,

Awesome Tiny JS / Unique ID Generation

@lukeed/uuid397almost 2 years agoReal UUIDs,
nanoid24,781almost 2 years agoRandom IDs with larger alphabet,
uid657almost 2 years agoMore of the same,
hexoid195almost 2 years agoHexadecimal IDs,

Awesome Tiny JS / Colors

colord1,702almost 3 years agoManipulate colors and convert between spaces, . Extra features come as plugins, 150b to 1.5 kB each
colr105over 6 years agoMore of the same,
polychrome288over 8 years agoMore of the same,
randomcolor6,097over 2 years agoAttractive random colors with configuration

Awesome Tiny JS / Touch Gestures

alloyfinger3,432over 7 years agoPan, swipe, tap, doubletap, longpress, pinch / rotate. My personal favorite.
tinygesture211almost 3 years agoConfigurable pan, swipe, tap, doubletap, longpress.
pointer-tracker186almost 2 years agoUnified interface for mouse, touch and pointer events,
detect-it419over 5 years agoDetect present and primary input method (touch / mouse) and supported events,
js-search2,215over 3 years agoFeature-rich and customizable: multi-field indices, stop words, custom stemmers and tokenizers
ndx153over 3 years agoSimilar to js-search, differs in and is less strict for multi-word queries . Supports field weights
wade2,979over 3 years agoAlso similar,
libsearch163about 4 years agoIndex-free search (slower, but easier to use) with sane ordering
stemmer128almost 4 years ago-
porter-stemmer100almost 6 years ago-
fuzzy832over 4 years agoIndex-free, can highlight matches
fuzzy-search226over 3 years agoWith stateful index
fzy.js152almost 2 years agoMatches one string at a time, tree-shakeable scores and match highlighting. total, or ~150 bytes for only
fuzzysearch2,715over 3 years agoOne string at a time, does not compute score / rank
liquidmetal296about 6 years agoQuicksilver algorithm, prioritizes matches at start of word for command abbreviations (e.g. -> ). One string at a time
quick-score159over 3 years agoAnother quicksilver-based lib, tweaked for long strings. Built-in list filtering and sorting, or 1.2 kB for single-string scoring
fuzzyset1,371almost 5 years agoFind misspellings, e.g. missipissi -> Missisipi, Commercial usage costs $42

Backlinks from these awesome lists:

More related projects: