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');
// 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

/condition-appoint/

    Package Sidebar

    Install

    npm i condition-appoint

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • nswbmw