callsite

WebJar for callsite

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

callsite
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

callsite
WebJar for callsite
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/tj/callsite

Download callsite

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/callsite/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>callsite</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/callsite/
implementation 'org.webjars.npm:callsite:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/callsite/
implementation ("org.webjars.npm:callsite:1.0.0")
'org.webjars.npm:callsite:jar:1.0.0'
<dependency org="org.webjars.npm" name="callsite" rev="1.0.0">
  <artifact name="callsite" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='callsite', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "callsite" % "1.0.0"
[org.webjars.npm/callsite "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

callsite

Access to v8's "raw" CallSites.

Installation

$ npm install callsite

Example

var stack = require('callsite');

foo();

function foo() {
  bar();
}

function bar() {
  baz();
}

function baz() {
  console.log();
  stack().forEach(function(site){
    console.log('  \033[36m%s\033[90m in %s:%d\033[0m'
      , site.getFunctionName() || 'anonymous'
      , site.getFileName()
      , site.getLineNumber());
  });
  console.log();
}

Why?

Because you can do weird, stupid, clever, wacky things such as:

License

MIT

Versions

Version
1.0.0