async function readJsonObjectFile(path) {
    const obj = JSON.parse(await fs_1.promises.readFile(path, 'utf8'));
    if (!obj || typeof obj !== 'object' || Array.isArray(obj)) {
        throw new Error(`Assumed JSON file at path "${path}" parsed to a non-object value.`);
    }
    return obj;
}
/**
 * Reads the assumed JSON file at the given path, attempts to parse it, and
 * returns the resulting object.
 *
 * Throws if failing to read or parse, or if the parsed JSON value is not a
 * plain object.
 *
 * @param paths - The path segments pointing to the JSON file. Will be passed
 * to path.join().
 * @returns The object corresponding to the parsed JSON file.
 */
Reads the assumed JSON file at the given path, attempts to parse it, and
returns the resulting object.

Throws if failing to read or parse, or if the parsed JSON value is not a
plain object.

@param paths - The path segments pointing to the JSON file. Will be passed
to path.join().
@returns The object corresponding to the parsed JSON file.
Reads the assumed JSON file at the given path attempts to parse it and returns the resulting object . Throws if failing to read or parse or if the parsed JSON value is not a plain object . @param paths - The path segments pointing to the JSON file . Will be passed to path . join () . @returns The object corresponding to the parsed JSON file .
async function readJsonObjectFile(path) {
    const obj = JSON.parse(await fs_1.promises.readFile(path, 'utf8'));
    if (!obj || typeof obj !== 'object' || Array.isArray(obj)) {
        throw new Error(`Assumed JSON file at path "${path}" parsed to a non-object value.`);
    }
    return obj;
}
async function readJsonObjectFile ( path ) { const obj = JSON . parse ( await fs_1 . promises . readFile ( path , 'utf8' ) ) ; if ( ! obj || typeof obj !== 'object' || Array . isArray ( obj ) ) { throw new Error ( ` ${ path } ` ) ; } return obj ; }
Reads the assumed JSON file at the given path, attempts to parse it, and
 returns the resulting object.
Reads the assumed JSON file at the given path attempts to parse it and returns the resulting object .