@supercharge/json
Version:
Secure drop-in replacement for the global `JSON` object
11 lines (10 loc) • 466 B
TypeScript
/**
* Converts a JSON string into an object. If a member contains nested objects,
* the nested objects are transformed before the parent object is.
*
* @param {String} text A valid JSON string.
* @param {Function} reviver A function that transforms the results. This function is called for each member of the object.
*
* @returns {*}
*/
export declare function parse<R = any>(input: string, reviver?: (this: any, key: string, value: any) => any): R | null;