Skip to content

nswbmw/condition-appoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

condition-appoint

Condition Promise, based on appoint.

Install

npm install condition-appoint

Usage

var Promise = require('condition-appoint');
// or use the pollyfill
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)
  })
// TypeError:  [TypeError: type error]
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)
  })
// default:  [TypeError: type error]
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)
  })
// default:  [TypeError: type error]

License

MIT

About

Condition Promise, based on [appoint](https://github.com/nswbmw/appoint).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published