@itsmworkbench/utils
Version:
The usual utility functions
10 lines (9 loc) • 460 B
TypeScript
export type JSONPrimitive = string | number | boolean | null;
export declare function isJsonPrimitive(x: any): x is JSONPrimitive;
export type JSONObject = {
[key: string]: JSONValue;
};
export type JSONArray = JSONValue[];
export type JSONValue = JSONPrimitive | JSONObject | JSONArray;
export declare const transformKeys: (fn: (key: string) => string) => <T>(jsonValue: any) => T;
export declare const transformKeysToCamelCase: <T>(jsonValue: any) => T;