@umah-creative/browser-native
v0.2.0
Published
A lightweight, modern TypeScript library that provides a unified interface to browser-native APIs such as Clipboard, Geolocation, Notifications, and more. Fully tree-shakeable, framework-agnostic, and optimized for modern browsers.
Downloads
301
Maintainers
Readme
@umah-creative/browser-native
A lightweight, modular, and framework-agnostic library providing a unified interface to browser-native APIs like Clipboard, Notifications, Geolocation, and more. Fully tree-shakeable and optimized for modern web applications.
Installation
pnpm add @umah-creative/browser-nativeUsage
import {
Clipboard,
Notification,
Geolocation,
} from '@umah-creative/browser-native';
// Clipboard
Clipboard.writeText('Hello World!');
// Notification
Notification.show('Hello!', { body: 'This is a notification.' });
// Geolocation
const position = await Geolocation.getCurrentPosition();
console.log(position.coords.latitude, position.coords.longitude);Features
- Modular API: Pick only the APIs you need.
- TypeScript-first: Fully typed for excellent developer experience.
- Tree-shakeable: Works with modern bundlers like Vite, Webpack, Rollup.
- Framework-agnostic: Can be used in any JavaScript/TypeScript project.
Documentation
Generate API documentation:
pnpm build:docsContributing
- Fork the repository
- Run
pnpm install - Make your changes in
packages/core - Run
pnpm buildandpnpm test - Submit a pull request
License
MIT © Umah Creative
