npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mirawision/chrome-api

v1.0.1

Published

A comprehensive TypeScript library for Chrome Extension API, providing type-safe wrappers and utilities for bookmarks, commands, context menus, cookies, downloads, storage, notifications, runtime, scripting, and side panel functionalities.

Readme

@mirawision/chrome-api

A comprehensive TypeScript library for Chrome Extension API, providing type-safe wrappers and utilities for various Chrome Extension functionalities. This library makes it easier to work with Chrome Extension APIs by providing a well-typed, intuitive interface.

Features

Bookmarks

  • Create, modify, and delete bookmarks
  • Search and retrieve bookmark information
  • Organize bookmarks in folders
  • Watch for bookmark changes

Commands

  • Register keyboard commands
  • Handle command triggers
  • Manage command shortcuts

Context Menu

  • Create and manage context menu items
  • Handle context menu clicks
  • Dynamic menu updates based on context

Cookies

  • Read and write cookies
  • Monitor cookie changes
  • Set cookie properties
  • Remove cookies

Downloads

  • Initiate and manage downloads
  • Track download progress
  • Search download history
  • Cancel or pause downloads

Local Storage

  • Store and retrieve data
  • Watch for storage changes
  • Clear storage data
  • Get storage usage information

Notifications

  • Create and display notifications
  • Handle notification interactions
  • Update existing notifications
  • Clear notifications

Runtime

  • Message passing between extension components
  • Handle extension lifecycle events
  • Manage extension state
  • Connect with native applications

Scripting

  • Execute scripts in web pages
  • Inject CSS into web pages
  • Register content scripts
  • Handle script execution results

Side Panel

  • Create and manage side panel
  • Update side panel content
  • Handle side panel interactions

Storage Sync

  • Sync data across devices
  • Handle sync conflicts
  • Monitor sync status
  • Manage sync quotas

Installation

npm install @mirawision/chrome-api

or

yarn add @mirawision/chrome-api

Usage

Here's a quick overview of how to use some of the core functionalities:

Bookmarks Example

import { createBookmark, getBookmark } from '@mirawision/chrome-api/bookmarks';

// Create a new bookmark
await createBookmark({
  title: 'My Bookmark',
  url: 'https://example.com'
});

// Get bookmark by ID
const bookmark = await getBookmark('1');
console.log(bookmark.title); // 'My Bookmark'

Notifications Example

import { createNotification } from '@mirawision/chrome-api/notifications';

// Create a notification
await createNotification('notification-id', {
  type: 'basic',
  title: 'Hello',
  message: 'This is a notification',
  iconUrl: 'icon.png'
});

Storage Example

import { setItem, getItem } from '@mirawision/chrome-api/local-storage';

// Store data
await setItem('user', { name: 'John', age: 30 });

// Retrieve data
const user = await getItem('user');
console.log(user.name); // 'John'

Context Menu Example

import { createContextMenuItem } from '@mirawision/chrome-api/context-menu';

// Create a context menu item
createContextMenuItem({
  id: 'searchText',
  title: 'Search for "%s"',
  contexts: ['selection']
});

Downloads Example

import { downloadFile, getDownload } from '@mirawision/chrome-api/downloads';

// Start a download
const downloadId = await downloadFile({
  url: 'https://example.com/file.pdf',
  filename: 'document.pdf'
});

// Get download info
const download = await getDownload(downloadId);
console.log(download.state); // 'in_progress' | 'complete' | 'interrupted'

Contributing

Contributions are always welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License.