readPackageLockJson
Reads the package-lock.json file from the specified folder or from the root if no folder is specified.
Import:
import { readPackageLockJson } from '@mnaoumov/typescript-dev-toolkit/npm';Signature:
function readPackageLockJson(cwd: string | undefined): Promise<PackageLockJson>Parameters:
| Parameter | Type | Description |
|---|---|---|
cwd |
string | undefined | The current working folder where package-lock.json is located. |
Returns: Promise<PackageLockJson> — A Promise that resolves with the parsed PackageJson object.