Skip to main content
browser-common

Small, tree-shakeable TypeScript wrappers around 40+ browser Web APIs.

app.ts
import {
  isClipboardApiAvailable,
  copyToClipboard,
} from '@rtorcato/browser-common/clipboard'

if (isClipboardApiAvailable()) {
  await copyToClipboard('hello world')
}
npm install @rtorcato/browser-common
Tiny per-module imports
Tiny per-module imports
146–257 B brotlied per subpath. Tree-shake to just the bytes you use.
Safe by default
Safe by default
Every module exports `is<Name>Available()`. Operations never throw on unsupported runtimes.
TypeScript-first
TypeScript-first
Strict types, generics preserved, JSDoc-rich in your IDE. Zero runtime dependencies.
44 Web APIs covered
44 Web APIs covered
One subpath per spec — clipboard, geolocation, storage, observers, and 40 more.

One subpath per Web API

Eight focused categories. 44 modules. Import exactly what you need.

View all modules →

Sibling projects

More from @rtorcato — same conventions, same release pipeline.