console.log
with called function name and source location
simmilar to console.trace
npm i tksi/log-passport
import log from 'log-passport';
const someFunction = () => {
log('hello from function');
log([1, 2, 3]);
log({ key: 'value' });
};
someFunction();
- Not compatible with CommonJS
- source location may be incorrect in some cases (depends on
Error.prototype.stack
)