1.1.4 • Published 1 year ago

never-fail v1.1.4

Weekly downloads
1
License
MIT
Repository
github
Last release
1 year ago

never-fail

NPM version NPM downloads

GitHub NodeJS Codecov semantic-release

Visual Studio Code

Never fail

import nf, { ignoreFailure, neverFail, warnFailure } from 'never-fail'

// default export and `neverFail()` is an alias of `ignoreFailure()`
// `warnFailure()` is the same as `ignoreFailure()` but emit `console.warn()` message during failure

(async () => {
  await ignoreFailure(() => anyCall())
  await ignoreFailure(() => returnRejectedPromise())
  await ignoreFailure(rejectedPromise)
  // will emit `custom message phrase throws ...` or
  // `custom message phrase rejected with ...`
  await warnFailure(_, 'custom message phrase')
}())
1.1.4

1 year ago

1.1.3

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago