• Asynchronously reads the entire contents of a file that contains a valid JSON string, and converts the content into an object.

    Type Parameters

    • T

    Parameters

    • file: PathLike | FileHandle

      filename or FileHandle

    • Optionaloptions: {
          encoding?: null;
          flag?: OpenMode;
      } & Abortable
    • Optionalreviver: Reviver<any>

      A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.

      @seereadFile @seeJSON.parse

    Returns Promise<T>