UNPKG

@readium/shared

Version:

Shared models to be used across other Readium projects and implementations in Typescript

12 lines (11 loc) 798 B
/** Parses the given array (or undefined it it's not an array) */ export declare function arrayfromJSON(json: any): Array<any> | undefined; export declare function arrayfromJSONorString(json: any): Array<any> | undefined; /** Parses the given key and returns a Date (or undefined if it’s not a string) */ export declare function datefromJSON(json: any): Date | undefined; /** Parses a numeric value, but returns undefined if it is not a positive number. */ export declare function numberfromJSON(json: any): number | undefined; /** Parses a numeric value, but returns undefined if it is not a positive number. */ export declare function positiveNumberfromJSON(json: any): number | undefined; /** Converts a Set to an Array object */ export declare function setToArray(obj: Set<any>): Array<any>;