Socket
Socket
Sign inDemoInstall

launch-editor

Package Overview
Dependencies
2
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

launch-editor

launch editor from node.js


Version published
Maintainers
2
Weekly downloads
7,212,006
increased by1.81%
Install size
63.3 kB

Weekly downloads

Package description

What is launch-editor?

The launch-editor npm package is designed to open files directly in the user's preferred code editor, at a specific line and column if desired. It's particularly useful for development tools and frameworks that want to provide a way to quickly jump to the source code from an error message or log output.

What are launch-editor's main functionalities?

Open a file in the default editor

This feature allows you to open a specific file in the default code editor.

const launchEditor = require('launch-editor');

launchEditor('path/to/file.js');

Open a file at a specific line and column

This feature allows you to open a file and jump to a specific line and column, which is useful for debugging purposes.

const launchEditor = require('launch-editor');

launchEditor('path/to/file.js', '1:5');

Specify a specific editor to open the file with

This feature allows you to specify which editor to use when opening a file, and provides a callback for error handling.

const launchEditor = require('launch-editor');

launchEditor('path/to/file.js', '1:5', 'code', (fileName, errorMsg) => {
  console.log(`Could not open ${fileName} in the editor.`, errorMsg);
});

Other packages similar to launch-editor

Keywords

FAQs

Last updated on 07 Oct 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc