Package detail

has-script

bconnorwhite67MIT2.0.0

Check if package.json contains a script

package, json, script, scripts

readme

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

changelog