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 'obsidian-dev-utils/script-utils/npm';

Signature:

function readPackageLockJsonSync(cwd: string | undefined): PackageLockJson

Parameters:

ParameterTypeDescription
cwdstring | undefinedThe current working folder where package-lock.json is located.

Returns: PackageLockJson — The parsed PackageLockJson object.