New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

maybestack

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maybestack

maybestack(err) - return stack of error or just return the error object

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
6
50%
Maintainers
1
Weekly downloads
 
Created
Source

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)
*/


Keywords

error

FAQs

Package last updated on 18 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts