How to use the promise-polyfill.Promise function in promise-polyfill

To help you get started, we’ve selected a few promise-polyfill 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 Kirkhammetz / termly.js / bin / classes / Shell.js View on Github external
polyfills() {
    if (!global.Promise) {
      global.Promise = require('promise-polyfill').Promise
    }
    if (!global.fetch) {
      global.fetch = require('whatwg-fetch')
    }
    return true
  }
github Kirkhammetz / termly.js / build / termly.js View on Github external
value: function polyfills() {
      if (!global.Promise) {
        global.Promise = require('promise-polyfill').Promise;
      }
      if (!global.fetch) {
        global.fetch = require('whatwg-fetch');
      }
      return true;
    }