require-promise

A wrapper around promise-polyfill to load the polyfill only if Promise isn't natively avaliable

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
require-promise
201.0.19 years ago9 years agoMinified + gzip package size for require-promise in KB

Readme

Promise polyfill wrapper
This is a wrapper around promise-polyfill. It either returns the native Promise (in Node >= 0.12), or promise-polyfill (in Node <= 0.10).
It just makes it easier to add the require.
var Promise = require('require-promise');

If you did this with require('require-promise') you would always get the polyfill.