• Given a directory it traverses the directory up looking for a package.json and if found, it reads it decodes the JSON, and returns its content as a Javascript object.

    Parameters

    • fromDirectory: string

    Returns Promise<{
        content: PackageJson;
        path: string;
    }>

    If found, the promise resolves with the path to the package.json and its content. If not found, it throws a FindUpAndReadPackageJsonNotFoundError error.