$ npm install get-current-line
Get the current line number of the executing file and method
npm install --save get-current-linerequire('get-current-line')<script type="module">
import * as pkg from '//dev.jspm.io/get-current-line'
</script>
This package is published with the following editions:
get-current-line/source/index.ts is typescript source code with import for modulesget-current-line/edition-browsers/index.js is typescript compiled against ESNext for web browsers with import for modulesget-current-line aliases get-current-line/edition-esnext/index.jsget-current-line/edition-esnext/index.js is typescript compiled against ESNext for Node.js with require for modulesEnvironments older than Node.js v8 may need Babel's Polyfill or something similar.
import getCurrentLine from 'get-current-line'
console.log(
getCurrentLine(/* optional offset information in case the caller is wrapped */)
)
{
"line": "3",
"method": "Object.<anonymous>",
"file": "location/to/the/calling/file.js"
}
Discover the release history by heading on over to the HISTORY.md file.
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
These amazing people have contributed code to this project:
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
Unless stated otherwise all works are:
and licensed under:
© 2010 - cnpmjs.org x YWFE | Home | YWFE