errors with clean stacks
error-clean-stack
errors with clean stacks
Install
npm install --save error-clean-stack
yarn add error-clean-stack
Import
// ES2015 import cleanErrors from 'error-clean-stack'
// CommonJS var cleanErrors = require('error-clean-stack')
Errors
All errors are exported as named exports.
Error ReferenceError EvalError RangeError ReferenceError SyntaxError TypeError URIError
Example:
examples/error.js
const {Error} = require('error-clean-stack') throw new Error()
-- -------------------- ---- ------- - ---- ----------------- ----------------------------------------------------- ----- --- ------- - ----- -- - ---------------------------------------------------------- -- - --------------------------------------------------------- -- ------------------ ----------------------------------------------------------
Contributing
All pull requests and issues welcome!
If you're not sure how, check out the great video tutorials on egghead.io!
License
MIT © Sam Gluck
HomePage
https://github.com/sdgluck/error-clean-stack#readme
Repository
git+https://github.com/sdgluck/error-clean-stack.git
来源:JavaScript中文网 ,转载请注明来源 https://www.javascriptcn.com/post/6005606b81e8991b448de8ff