HasScript returns true if the given package.json file defines a script with the given name.
(p *PackageJSON, name string)
| 284 | |
| 285 | // HasScript returns true if the given package.json file defines a script with the given name. |
| 286 | func HasScript(p *PackageJSON, name string) bool { |
| 287 | if p == nil { |
| 288 | return false |
| 289 | } |
| 290 | _, ok := p.Scripts[name] |
| 291 | return ok |
| 292 | } |
| 293 | |
| 294 | // HasDevDependencies returns true if the given directory contains a package.json file that lists |
| 295 | // more one or more devDependencies. |
no outgoing calls