chrome-async
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

chrome-async

An async wrapper for chrome. Useful when developing a chrome extension.

Installing

npm i chrome-async

Usage

Wrap chrome call with the chromeAsync function and pass callback argument as the call parameter:

import chromeAsync from 'chrome-async';

const tab = await chromeAsync<chrome.tabs.Tab>((callback) =>
  chrome.tabs.create({ url: 'about:blank', active: true }, callback)
);

/chrome-async/

    Package Sidebar

    Install

    npm i chrome-async

    Weekly Downloads

    2

    Version

    0.1.3

    License

    ISC

    Unpacked Size

    2.47 kB

    Total Files

    6

    Last publish

    Collaborators

    • vsdizzy