diff --git a/Source/Fn/JSON.ts b/Source/Fn/JSON.ts index f597d241..a3fca2ef 100644 --- a/Source/Fn/JSON.ts +++ b/Source/Fn/JSON.ts @@ -2,15 +2,15 @@ import { readFile as _File } from "fs/promises"; import { dirname as Dir } from "path"; import { fileURLToPath as Path } from "url"; - - /** - * The function `JSON` is a TypeScript function that reads a JSON file and returns its parsed content. - * @param {string} File - The `File` parameter is a string that represents the name or path of the JSON - * file that you want to parse. - * @param {string} From - The `From` parameter is a string that represents the source URL or file path - * from which the JSON file will be loaded. It is set to `import.meta.url` by default, which refers to - * the URL of the current module. However, if a different source URL or file path is provided, + * The function 'JSON' is a TypeScript function that reads a JSON file and returns its + * parsed content. + * @param {string} File - The `File` parameter is a string that represents the name or + * path of the JSON file that you want to parse. + * @param {string} [From] - The `From` parameter is an optional string that represents + * the directory path from which the JSON file should be loaded. If `From` is provided, + * it will be used as the base directory path. If `From` is not provided, the current + * directory will be used as the base directory path. */ export default async (File: string, From?: string) => JSON.parse( diff --git a/Target/Fn/JSON.d.ts b/Target/Fn/JSON.d.ts index c5dbfdf4..a2d210b3 100644 --- a/Target/Fn/JSON.d.ts +++ b/Target/Fn/JSON.d.ts @@ -1,10 +1,12 @@ /** - * The function `JSON` is a TypeScript function that reads a JSON file and returns its parsed content. - * @param {string} File - The `File` parameter is a string that represents the name or path of the JSON - * file that you want to parse. - * @param {string} From - The `From` parameter is a string that represents the source URL or file path - * from which the JSON file will be loaded. It is set to `import.meta.url` by default, which refers to - * the URL of the current module. However, if a different source URL or file path is provided, + * The function 'JSON' is a TypeScript function that reads a JSON file and returns its + * parsed content. + * @param {string} File - The `File` parameter is a string that represents the name or + * path of the JSON file that you want to parse. + * @param {string} [From] - The `From` parameter is an optional string that represents + * the directory path from which the JSON file should be loaded. If `From` is provided, + * it will be used as the base directory path. If `From` is not provided, the current + * directory will be used as the base directory path. */ declare const _default: (File: string, From?: string) => Promise; export default _default;