condition-appoint
1.0.0 • Public • Published condition-appoint
Condition Promise, based on appoint.
Install
npm install condition-appoint
Usage
var Promise = require('condition-appoint');
require('condition-appoint/polyfill');
Example
var Promise = require('condition-appoint')
Promise.reject(new TypeError('type error'))
.catch(function SyntaxError(e) {
console.error('SyntaxError: ', e)
})
.catch(function TypeError(e) {
console.error('TypeError: ', e)
})
.catch(function (e) {
console.error('default: ', e)
})
var Promise = require('condition-appoint')
Promise.reject(new TypeError('type error'))
.catch(function SyntaxError(e) {
console.error('SyntaxError: ', e)
})
.catch(function ReferenceError(e) {
console.error('ReferenceError: ', e)
})
.catch(function (e) {
console.error('default: ', e)
})
var Promise = require('condition-appoint')
Promise.reject(new TypeError('type error'))
.catch(function SyntaxError(e) {
console.error('SyntaxError: ', e)
})
.catch(function (e) {
console.error('default: ', e)
})
.catch(function TypeError(e) {
console.error('TypeError: ', e)
})
License
MIT
Dependencies (1)
Dev Dependencies (3)
Package Sidebar
Install
Weekly Downloads