
app.ts
import {
isEmpty,
toKebabCase,
sleep,
deepClone,
} from '@rtorcato/js-common'
const data = { a: 1 }
const copy = deepClone(data)
await sleep(200)
toKebabCase('Hello World')
// 'hello-world'npm install @rtorcato/js-commonUltra-lightweight
~277 B core bundle; 50–200 B per module.
Tree-shakeable
Named subpath exports — ship only what you import.
TypeScript-first
Strict types, generics preserved, JSDoc-rich in your IDE.
CLI included
Run utilities from your terminal via npx.
Everything in one place
Nine focused categories. 46 modules. Import exactly what you need.
Date & Time
4 modules
Dates, times, intervals and timezones.
datedatetimetimeinterval
Numbers & Math
3 modules
Arithmetic, rounding and randomness.
numbersmathrandom
Text & Strings
5 modules
Formatting, slugs, HTML and i18n.
formattingstringshtmlregex
Security & Validation
5 modules
Passwords, emails, URLs and guards.
securityemailsurlvalidation
Data Structures
5 modules
Arrays, objects, maps, sets and JSON.
arraysobjectsjsonmaps
Async & Control Flow
6 modules
Promises, debounce, retries and aborts.
promisesfunctionssleeptry
System & Process
6 modules
Env, OS, Node and process helpers.
envosnodeprocess
Logging
2 modules
Pino logger and console capture.
loggerlogging
Other Utilities
10 modules
Colors, crypto, currency, files and more.
colorscryptocurrencyuuid
Sibling projects
More from @rtorcato — same conventions, same release pipeline.
@rtorcato/browser-common
Docs ↗
Small, tree-shakeable TypeScript wrappers around 40+ browser Web APIs.
@rtorcato/js-tooling
Docs ↗
Shared Biome, TypeScript, Vitest and semantic-release presets that power the @rtorcato/* family.
rtorcato/swift-common
Docs ↗
Common Swift utilities for Apple platforms — Foundation Core + SwiftUI UI.
