Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-current-line

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-current-line

Get the current line number of the executing file and method

  • 1.0.0-next.1576083739.44c8836be75ba703e85cca50cf8aea5adde08de0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.1K
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

get-current-line

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Get the current line number of the executing file and method

Install

npm

  • Install: npm install --save get-current-line
  • Require: require('get-current-line')

jspm

<script type="module">
    import * as pkg from '//dev.jspm.io/get-current-line'
</script>

Editions

This package is published with the following editions:

  • get-current-line/source/index.ts is typescript source code with import for modules
  • get-current-line/edition-browsers/index.js is typescript compiled against ESNext for web browsers with import for modules
  • get-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

API Documentation.

import getCurrentLine from 'get-current-line'
console.log(
    getCurrentLine(/* optional offset number of lines to skip if your caller is wrapped */)
)
{
    "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:

  • Benjamin Lupton

Sponsors

No sponsors yet! Will you be the first?

GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Contributors

No contributors yet! Will you be the first?

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:

Keywords

FAQs

Package last updated on 11 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc