can-promise

Tiny module for checking if Promise is globally available

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
can-promise
000.0.16 years ago6 years agoMinified + gzip package size for can-promise in KB

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