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

resolve-bin

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-bin

Resolves the full path to the bin file of a given package by inspecting the "bin" field in its package.json.

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25K
decreased by-57.99%
Maintainers
1
Weekly downloads
 
Created
Source

resolve-bin build status

Resolves the full path to the bin file of a given package by inspecting the "bin" field in its package.json.

var resolveBin = require('resolve-bin');

// package.json: "bin": "bin/tap.js"
resolveBin('tap', function (err, bin) {
  if (err) return console.error(err);
  console.log(bin);  
});

// => [..]/resolve-bin/node_modules/tap/bin/tap.js

Installation

npm install resolve-bin

API

resolveBin(name, opts, cb)

Resolves the full path to the bin file of a given package by inspecting the "bin" field in its package.json.

Parameters:
NameTypeArgumentDescription
name string

module name, i.e. 'tap'

opts Object <optional>

options

Properties
NameTypeDescription
executable string

(default: @name) executable name (e.g. 'buster-test')

cb function

called back with the full path to the bin file of the module or an error if it couldn't be resolved

Source:

generated with docme

License

MIT

Keywords

FAQs

Package last updated on 22 May 2014

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