maybestack

2.0.0 • Public • Published

maybestack

Returns error stack of an object if it exists.

 
import maybestack from 'maybestack'
 
const a = {a: 'ok'}
const b = new Error('stuff')
 
maybestack(a) // {a: 'ok'}
maybestack(b) /*
  Error: stuff
    at Error (native)
*/
 
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i maybestack

Weekly Downloads

0

Version

2.0.0

License

MIT

Last publish

Collaborators

  • str_t