webdev-power-kit
Version:
A powerful toolkit that simplifies access to browser features like clipboard, notifications, battery, vibration, and more β perfect for modern web developers.
172 lines (116 loc) β’ 5.29 kB
Markdown
<p align="center">
<img src="https://raw.githubusercontent.com/dev-aditya-lab/webdev-power-kit/refs/heads/main/webdev%20logo%20long.png" width="500" alt="WebDev Power Kit Logo" />
</p>
<!-- <h1 align="center">π WebDev Power Kit</h1> -->
<p align="center">
A powerful, modular toolkit that simplifies working with browser APIs, utility tools, and system-level features β built for modern web developers. β‘
</p>
[](https://www.npmjs.com/package/webdev-power-kit)
[](https://www.npmjs.com/package/webdev-power-kit)
[](https://opensource.org/licenses/MIT)
[](https://webdev-power-kit.hashnode.space/docs/introduction)
[](https://github.com/dev-aditya-lab)
## π¦ About the Project
**WebDev Power Kit** is a TypeScript-powered, modular toolkit designed to make common browser tasks and utility features incredibly simple and developer-friendly.
Whether you're building SPAs, dashboards, dev tools, or internal tools β this package saves you from writing repetitive, error-prone code.
Write clean, future-ready web apps with ease using modern browser features in just one line of code:
### β¨ Highlights
* β
**Modular Structure** β only import what you need
* π§ **TypeScript Support** β 100% typed with full JSDoc comments
* βοΈ **React-friendly** β examples included for React developers
* π **Browser API Wrappers** β safe, clean functions for real-world apps
* π **System Utilities** β OTPs, UUIDs, performance, and more
* π§ͺ **Well-tested** β secure, production-ready utilities
## π Documentation
Explore detailed guides, feature docs, and examples in the docs section:
π [View Full Documentation](https://webdev-power-kit.hashnode.space/docs/introduction)
**Structure Includes:**
* β¨ Features
* π₯ Parameters
* π Return values
* βοΈ React usage examples
* π¨ Error handling tips
* π¦ Real world use cases
* π Browser support tables
Each page is written for **developers**, not bots. With TypeScript context and practical examples that work in real apps.
## π¦ Installation
```bash
npm install webdev-power-kit
# or
yarn add webdev-power-kit
```
### Via CDN (ES Module):
```html
<script type="module">
import { copyToClipboard } from 'https://cdn.jsdelivr.net/npm/webdev-power-kit/+esm';
copyToClipboard('Hello via CDN!');
</script>
```
## β‘ Quickstart
### HTML (CDN ESM):
```html
<script type="module">
import { copyToClipboard } from 'https://cdn.jsdelivr.net/npm/webdev-power-kit/+esm';
copyToClipboard('Hello world from clipboard!');
</script>
```
### React Example:
```tsx
import { vibrate } from 'webdev-power-kit';
export default function App() {
return <button onClick={() => vibrate([200,100,200])}>Vibrate</button>;
}
```
## π Usage Example
```ts
import { copyToClipboard } from "webdev-power-kit/browser/clipboard";
copyToClipboard("Hello from clipboard!")
.then(() => console.log("Copied!"))
.catch(err => console.error("Error copying:", err));
```
```tsx
"use client";
import React from "react";
import { useEffect } from "react";
import { isOnline } from "webdev-power-kit/browser/network/is-online";
export default function NetworkStatus() {
useEffect(() => {
console.log("User is online:", isOnline());
}, []);
return <p>Check console for online status β
</p>;
}
```
## π€ Contributing
Pull requests are welcome! For major changes, please open an issue first.
We follow a clean modular structure β every feature must:
* Be placed in its own folder (Meaningful name)
* Include `index.ts` with typed exports
* Handle errors gracefully
* Include comments and JSDoc
* Follow `files` whitelist in `package.json`
## π FAQ
* **Does it work with frameworks?**
>. Yes, fully compatible with React, Vue, Svelte, or Vanilla JS.
* **Need HTTPS or special setup?**
> Some features (clipboard, geolocation) require secure context. Testing with `file://` wonβt workβuse Live Server or serve locally.
* **What browsers are supported?**
> Modern desktop and mobile browsers are fully supported. Specific browser notes are included in each feature doc.
## π¨βπ» Author
**Aditya Kumar Gupta**
Computer Science Engineer β’ Web Developer β’ Hackathon Enthusiast
<!-- * π [Portfolio](https://your-portfolio-link) -->
* π [GitHub](https://github.com/dev-aditya-lab)
* π [Hashnode Docs](https://webdev-power-kit.hashnode.space/docs/introduction)
## π License
Distributed under the **MIT License**.
See `LICENSE` for details.
> π `webdev-power-kit` makes building professional browser-based apps faster, safer, and fun again.
> Import only what you need β clean, typed, and production-ready.