mithril-vndb/promise/promise.js

13 lines
405 B
JavaScript

"use strict"
var PromisePolyfill = require("./polyfill")
if (typeof window !== "undefined") {
if (typeof window.Promise === "undefined") window.Promise = PromisePolyfill
module.exports = window.Promise
} else if (typeof global !== "undefined") {
if (typeof global.Promise === "undefined") global.Promise = PromisePolyfill
module.exports = global.Promise
} else {
module.exports = PromisePolyfill
}