Check if a `package-lock.json` is present in the working directory
npm install has-package-lock> Check if a package-lock.json is present in the working directory




``sh`
npm install --save has-package-lock
`sh`
$ tree
.
├── bar
│ ├── package-lock.json
│ └── package.json
└── foo
└── package.json
`js
const hasPackageLock = require('has-package-lock');
hasPackageLock('bar');
//=> true
hasPackageLock('foo');
//=> false
`
Returns boolean.
#### cwd
Type: stringprocess.cwd()`
Default:
Current working directory.
* 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
MIT © Lufty Wiranda