callsite

WebJar for callsite

License

License

MIT
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-tj-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 github-com-tj-callsite

How to add to project

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