UNPKG

has-package-lock

Version:

Check if a `package-lock.json` is present in the working directory

10 lines (6 loc) 222 B
'use strict'; const { existsSync } = require('fs'); const { resolve } = require('path'); const hasPackageLock = (cwd = process.cwd()) => existsSync(resolve(cwd, 'package-lock.json')); module.exports = hasPackageLock;