Small, tree-shakeable TypeScript wrappers around 40+ browser Web APIs.
import {
isClipboardApiAvailable,
copyToClipboard,
} from '@rtorcato/browser-common/clipboard'
if (isClipboardApiAvailable()) {
await copyToClipboard('hello world')
}npm install @rtorcato/browser-commonOne subpath per Web API
Eight focused categories. 44 modules. Import exactly what you need.
Local, session, cookies, and the File System Access API.
Battery, geolocation, motion, orientation, idle and screen state.
Clipboard, drag-and-drop, focus, forms, keyboard, pointer and touch.
Canvas, HTML media, devices, vibration and web-share.
DOM helpers, fullscreen, iframe, history, location and window.
IntersectionObserver, MutationObserver, ResizeObserver and PerformanceObserver.
Background tasks, service workers, web locks and WebSockets.
Alerts, notifications, print, encoding, permissions and shared helpers.
Sibling projects
More from @rtorcato — same conventions, same release pipeline.
Tree-shakeable TypeScript utilities — tiny bundles, full type safety, CLI included.
Shared Biome, TypeScript, Vitest and semantic-release presets that power the @rtorcato/* family.
Common Swift utilities — the Apple-platform sibling of js-common and browser-common.