Skip to content

readPackageLockJsonSync

Reads the package-lock.json file from the specified folder or from the root if no folder is specified.

Import:

import { readPackageLockJsonSync } from '@mnaoumov/typescript-dev-toolkit/npm';

Signature:

function readPackageLockJsonSync(cwd: string | undefined): PackageLockJson

Parameters:

Parameter Type Description
cwd string | undefined The current working folder where package-lock.json is located.

Returns: PackageLockJson — The parsed PackageLockJson object.