@evojs/callsite
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

@evojs/callsite

Node.js callsite loader

Why

Get information where your function was called

@evojs/callsite npm version supported node version for @evojs/callsite total npm downloads for @evojs/callsite monthly npm downloads for @evojs/callsite npm licence for @evojs/callsite

Usage example

import { Callsite } from '@evojs/callsite';

const yourFn = () => {
  const depth = 1, count = 1;
  const callsite = Callsite.get(depth, count)[0];

  console.log(`Callsite was called here: ${callsite.fileName}:${callsite.line}:${callsite.column}`);
};

yourFn();

License

Licensed under MIT license

Readme

Keywords

Package Sidebar

Install

npm i @evojs/callsite

Weekly Downloads

254

Version

0.3.0

License

MIT

Unpacked Size

5.55 kB

Total Files

5

Last publish

Collaborators

  • aristocr2t