UNPKG

@riogz/router

Version:

A simple, lightweight, powerful, view-agnostic, modular and extensible router

19 lines (18 loc) 844 B
export type arrayFormat = 'none' | 'brackets' | 'index'; export type booleanFormat = 'none' | 'string' | 'unicode' | 'empty-true'; export type nullFormat = 'default' | 'string' | 'hidden'; export interface IOptions { arrayFormat?: arrayFormat; booleanFormat?: booleanFormat; nullFormat?: nullFormat; } export interface IFinalOptions { arrayFormat: arrayFormat; booleanFormat: booleanFormat; nullFormat: nullFormat; } export declare const makeOptions: (opts?: IOptions) => IFinalOptions; export declare const decodeValue: (value: string) => string; export declare const encodeArray: (name: string, arr: any[], opts: IFinalOptions) => string; export declare const encode: (name: string, value: any, opts: IFinalOptions) => string; export declare const decode: (value: any, opts: IFinalOptions) => boolean | string | null;