New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

source-line

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

source-line

This plugin displays source code lines

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

source-line

This plugin displays source code lines

Example

In

// index.js
console.log("test")

Out

console.log('index.js (1:0)', 'test')

Installation

npm install source-line --save-dev

Usage

.babelrc

{
  "plugins": ["module:source-line"]
}
{
  "plugins": [ 
    ["module:source-line", {
      "segments": 0, 
      "splitSegment": "/"
      }] 
  ]
}

Via CLI

babel --plugins source-line script.js

Options

  • segments - Display file path
    • 0 full file path (Default)
    • 1 The file name only displays the file name
    • 2 file name and last segment
  • splitSegment - How to split the path; windows user '\', linux macOS use /
  • color - Display background color default false

FAQs

Package last updated on 14 May 2024

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