@evojs/callsite
v0.3.0
Published
Nodejs callsite loader
Downloads
843
Readme
@evojs/callsite
Node.js callsite loader
Why
Get information where your function was called
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