How to use extra-promise - 2 common examples

To help you get started, we’ve selected a few extra-promise examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BlackGlory / appoint-font / src / utils.js View on Github external
if (err) {
          return reject(err)
        }
        return resolve(...args)
      })
    })
  }
}

export const getFont = chromePromisify(chrome.fontSettings.getFont)
export const getMinimumFontSize = chromePromisify(chrome.fontSettings.getMinimumFontSize)
export const getFontList = chromePromisify(chrome.fontSettings.getFontList)
export const get = chromePromisify((...args) => chrome.storage.local.get(...args))
export const set = chromePromisify((...args) => chrome.storage.local.set(...args))
export const insertCSS = promise.warn(chromePromisify(chrome.tabs.insertCSS))
export const executeScript = promise.warn(chromePromisify(chrome.tabs.executeScript))
export const getAllFrames = chromePromisify(chrome.webNavigation.getAllFrames)
github BlackGlory / appoint-font / src / utils.js View on Github external
const err = chrome.runtime.lastError
        if (err) {
          return reject(err)
        }
        return resolve(...args)
      })
    })
  }
}

export const getFont = chromePromisify(chrome.fontSettings.getFont)
export const getMinimumFontSize = chromePromisify(chrome.fontSettings.getMinimumFontSize)
export const getFontList = chromePromisify(chrome.fontSettings.getFontList)
export const get = chromePromisify((...args) => chrome.storage.local.get(...args))
export const set = chromePromisify((...args) => chrome.storage.local.set(...args))
export const insertCSS = promise.warn(chromePromisify(chrome.tabs.insertCSS))
export const executeScript = promise.warn(chromePromisify(chrome.tabs.executeScript))
export const getAllFrames = chromePromisify(chrome.webNavigation.getAllFrames)

extra-promise

Utilities for JavaScript Promise and AsyncFunction

MIT
Latest version published 4 months ago

Package Health Score

56 / 100
Full package analysis

Popular extra-promise functions

Similar packages