Motivation
To provide it's users a way to handle different types of values as a promise.
Installation
npm install promise-ensurer
Notes
- The generated promises are bluebird promises
Usage
var promiseEnsurer = ; // Returns a promise which will be rejectedpromiseEnsurer; // Returns a promise which will be resolvedpromiseEnsurer; // Returns a promise which will be rejectedpromiseEnsurer; // Returns a promise which will be resolved with the given objectpromiseEnsurer; // Returns the same given promisepromiseEnsurer;
Run Tests
$ npm install --dev$ npm test