Socket
Socket
Sign inDemoInstall

@distributed-systems/callsite

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@distributed-systems/callsite

get structured callsite information


Version published
Weekly downloads
2.7K
increased by12.27%
Maintainers
1
Weekly downloads
 
Created
Source

Callsite

Get structured callsite information

If you just need structured stack-frames, please use the Stack-Trace library

ESM:

import Callsite from 'es-modules/distributed-systems/callsite/2.0.0+/index.mjs';

NPM:

import Callsite from '@distributed-systems/callsite';

API

Stack Frame format returned from the library

[{
    name: 'new Cls',
    source: 'stack-trace/test/200.000-stack-parser.mjs',
    line: 52,
    column: 27 
}]

Get Callsite Info

const cs = new Callsite();

// get callsite info
const callsite info = cs.getStack(); 

Get Callsite Info, more frames

const cs = new Callsite();

// get callsite info
const callsite info = cs.getStack({
    limit: 100,
}); 

Get Callsite Info, from a custom error

const cs = new Callsite();
const err = new Error('my custom error');

// get callsite info
const callsite info = cs.getStack({
    limit: 100,
    err,
});

Keywords

FAQs

Package last updated on 30 Aug 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc