JSPM

can-promise

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3049
  • Score
    100M100P100Q119003F
  • License MIT

Tiny module for checking if Promise is globally available

Package Exports

  • can-promise

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (can-promise) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

can-promise

Tiny module for checking if Promise is globally available.

Installation

npm i --save can-promise

Example

const canPromise = require('can-promise')
// or
import canPromise from 'can-promise'

// on Node < 0.11.13
console.log(canPromise()) // false

// on Node >= 0.11.13
console.log(canPromise()) // true

// on IE9
console.log(canPromise()) // false

// on Chrome, Firefox
console.log(canPromise()) // true