get-line-number
get-line-number is a simple npm package that helps you find the line number of a specific code snippet in your JavaScript project.
Installation
You can install the package via npm:
npm install get-line-number
Usage
Simply import the "get-line-number" from the package and call it to get the line number where the function was called:
const getLineNumber = require("get-line-number");
const lineNumber = getLineNumber();
console.log(lineNumber); // line number !
This will log the line number of the console.log(lineNumber); statement
Contributing
Contributions are welcome! If you find a bug or want to suggest a feature, please open an issue or submit a pull request.
License
GitHub Repository
The source code for this package is available on github.
Author
line-number-finder was created by codingKrills.