1.0.1-beta • Published 3 years ago

where-call v1.0.1-beta

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Where Call

install

npm install where-call

functions

  • whereIsCallFunction(): Info | null
// source.js
function foo() {
  return whereIsCallFunction();
}
const location = foo();
//       │       ↑
//       └───────┘
//     source.js:4:17
  • whereIsHere(): Info | null
// source.js
function foo() {
  const location = whereIsHere();
//         │       ↑
//         └───────┘
//       source.js:2:19
}
foo();

object

  • Info: location detail
    • line: number
    • column: number
    • file: string

Related