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

2.0.0 • Public • Published

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

Package Sidebar

Install

npm i has-script

Weekly Downloads

13

Version

2.0.0

License

MIT

Unpacked Size

4.78 kB

Total Files

8

Last publish

Collaborators

  • bconnorwhite