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

convert-slash-exec

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-slash-exec

NPM utility to execute commands regardless of path seperators

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

convert-slash-exec

NPM utility to execute commands regardless of path seperators

Why?

Executing binaries bundled with your Node projects seems nigh impossible to get working with NPM scripts. Even if you write shell scripts to wrap your executable it is hard to get past these two things:

  • You cannot have an executable in a subdirectory due to different path seperators
  • You cannot refer to an executable in the current directory on Unices without prefixing the path with ./, which breaks on Windows.

This little util fixes these two annoyances.

Usage:

convert-slash-exec some/exe/in/subdir

convert-slash-exec ./my-command 

This will simply execute those commands as usual on Unices, but in the first case all slashes will become backslashes and in the second example the prefix will be removed.

FAQs

Package last updated on 27 Apr 2016

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