get-current-line
Get the current line number of the executing file and method
Install
- Install:
npm install --save get-current-line
- Require:
require('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.js
get-current-line/edition-esnext/index.js
is typescript compiled against ESNext for Node.js with require for modules
Environments older than Node.js v8 may need Babel's Polyfill or something similar.
Usage
Complete API Documentation.
import getCurrentLine from 'get-current-line'
console.log(
getCurrentLine()
)
{
"line": "3",
"method": "Object.<anonymous>",
"file": "location/to/the/calling/file.js"
}
History
Discover the release history by heading on over to the HISTORY.md
file.
Contribute
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
Backers
Maintainers
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
License
Unless stated otherwise all works are:
- Copyright © 2011+ Benjamin Lupton
and licensed under: