UNPKG

683 BTypeScriptView Raw
1interface EncodeOptions {
2 align?: boolean;
3 section?: string;
4 sort?: boolean;
5 whitespace?: boolean;
6 newline?: boolean;
7 platform?: string;
8 bracketedArray?: boolean;
9}
10
11interface DecodeOptions {
12 bracketedArray?: boolean;
13}
14
15export function decode(str: string, options?: DecodeOptions): {
16 [key: string]: any;
17};
18export function parse(str: string, options?: DecodeOptions): {
19 [key: string]: any;
20};
21export function encode(object: any, options?: EncodeOptions | string): string;
22export function stringify(object: any, options?: EncodeOptions | string): string;
23export function safe(val: string): string;
24export function unsafe(val: string): string;