core3-utils

@wixc3/fs-utils on Github

Home > @wixc3/fs-utils > getPackageJsonPath

getPackageJsonPath() function

Gets path to package.json file closest to the given file path.

Signature:

export declare function getPackageJsonPath(filePath: string, fs: IFileSystem): string | undefined;

Parameters

Parameter Type Description
filePath string a file path
fs IFileSystem file system

Returns:

string | undefined