UNPKG

@arifwidianto/rpc-agent

Version:

RPC Agent for both client and server, extends more methods easily

15 lines (14 loc) 716 B
import { JSONValue } from "../interfaces"; export declare function parseJSON(str: string): JSONValue; export declare function stringifyJSON(value: JSONValue): string; export declare function isValidJSON(value: unknown): value is JSONValue; export declare function safeJSONParse<T extends JSONValue = JSONValue>(value: string, returnInvalid?: T): T; export declare function safeJSONString<T extends JSONValue = JSONValue>(value: JSONValue, returnInvalid?: T): string; declare const _default: { parseJSON: typeof parseJSON; stringifyJSON: typeof stringifyJSON; safeJSONParse: typeof safeJSONParse; safeJSONString: typeof safeJSONString; isValidJSON: typeof isValidJSON; }; export default _default;