vsDizzy / chrome-async

Async wrapper for chrome calls

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)
);

About

Async wrapper for chrome calls


Languages

Language:TypeScript 100.0%