0.1.3 • Published 4 years ago
chrome-async v0.1.3
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)
);