/**
 * Polyfill implementation.
 *
 * Copyright (C) 2016 Martin Poelstra
 * License: MIT
 */ import { Promise } from "./Promise" ; import { getGlobal } from "./util" ; param { boolean } force return { boolean } export default function polyfill ( force = false ) { const global = getGlobal ( ) ; if ( ! global ) { return false ; } if ( force || typeof global . Promise !== "function" ) { global . Promise = Promise ; return true ; } return global . Promise instanceof Promise ; }