Skip to content

Converts callback functions and methods to promises.

Notifications You must be signed in to change notification settings

DanielHerr/Promisify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Promisify

Converts Chrome extension API callback functions to support promises. Dependent only on Promise.

Usage:

console.log(await promisify_chrome_callback_function(chrome.runtime.getPlatformInfo)())

promisify_chrome_function(chrome.management, "getSelf")
console.log(await chrome.management.getSelf())
chrome.management.getSelf(console.log)

promisify_chrome_object(chrome.runtime)
console.log(await chrome.runtime.getPlatformInfo())
chrome.runtime.getPlatformInfo(console.log)
console.log(chrome.runtime.getManifest())

About

Converts callback functions and methods to promises.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published