get-package-bin
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

get-package-bin

Get bin object from package.json

Installation

npm add get-package-bin

Usage

import { getPackageBin } from "get-package-bin";

const binObj = getPackageBin("./node_modules/typescript");
/*
{
  tsc: "/PATH/TO/node_modules/typescript/bin/tsc",
  tsserver: "/PATH/TO/node_modules/typescript/bin/tsserver"
}
*/

const bin = getPackageBin("./node_modules/typescript", "tsc");
// "/PATH/TO/node_modules/typescript/bin/tsc"

Readme

Keywords

none

Package Sidebar

Install

npm i get-package-bin

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

1.97 kB

Total Files

4

Last publish

Collaborators

  • arzyu