has-package-lock
Check if a
package-lock.json
is present in the working directory
Installation
npm install --save has-package-lock
Usage
$ tree.├── bar│ ├── package-lock.json│ └── package.json└── foo └── package.json
const hasPackageLock = ; ;//=> true ;//=> false
API
hasPackageLock([cwd])
Returns boolean
.
cwd
Type: string
Default: process.cwd()
Current working directory.
Related
- has-lockfile - Check which lockfile is present in the working directory
- has-yarn - Check if a project is using Yarn
- pkg-man - Detect which package manager that should be used
License
MIT © Lufty Wiranda