@fntio/infra-client
Version:
Self-hosted AWS access portal: credential vending, target-account trust, and grant-driven private networking as CDK stacks and constructs.
19 lines (18 loc) • 565 B
TypeScript
/** JSON type */
export type Json = null | string | number | boolean | Json[] | JsonObject;
/** JSON Object type */
export type JsonObject = {
[name: string]: Json;
};
/**
* Check if a piece of JSON is a JSON object, and not e.g. a mere string or null
*
* @param j - the JSON
*/
export declare function isJsonObject(j: Json): j is JsonObject;
/**
* Parse a string as JSON, while removing __proto__ and constructor, so JS prototype pollution is prevented
*
* @param s - the string to JSON parse
*/
export declare function safeJsonParse(s: string): Json;