UNPKG

@alwatr/node-fs

Version:

Enhanced file system operations in Node.js with asynchronous queue to prevent parallel writes.

25 lines 595 B
/** * Parse json string. * * @param content - json string * @returns json object * @example * ```typescript * const json = parseJson('{"a":1,"b":2}'); * console.log(json.a); // 1 * ``` */ export declare function parseJson<T extends JsonValue>(content: string): T; /** * Stringify json object. * * @param data - json object * @returns json string * @example * ```typescript * const json = jsonStringify({a:1, b:2}); * console.log(json); // '{"a":1,"b":2}' * ``` */ export declare function jsonStringify<T extends JsonValue>(data: T): string; //# sourceMappingURL=json.d.ts.map