npm.io
2.0.0 • Published 3 years ago

has-script

Licence
MIT
Version
2.0.0
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
3

has-script

npm typescript

Check if package.json contains a script.

If I should maintain this repo, please ️ GitHub stars

DM me on Twitter if you have questions or suggestions. Twitter Follow


Installation

yarn add has-script
npm install has-script
pnpm add has-script

Usage

import { hasScript, hasScriptLike } from "has-script";

// Returns true if the exact match exists in the package.json script field.
function hasScript(name: string): Promise<boolean>;

// All strings that match the given RegExp.
function hasScriptLike(regex: RegExp): Promise<string[]>;

Dependenciesdependencies


Dev Dependencies

  • autorepo: Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.

License license

MIT - The MIT License

Keywords