@mcma/core
Version:
Node module with type definitions and helper utils for the EBU MCMA framework
24 lines (23 loc) • 1.07 kB
TypeScript
declare function isValidUrl(url: string): boolean;
declare function getTypeName(type: string | object | Function): string;
declare function toBase64(text: string): string;
declare function fromBase64(base64Text: string): string;
declare function sleep(timeout: number): Promise<void>;
declare function isValidDateString(value: any): boolean;
declare function reviver(this: any, key: string, value: any): any;
declare function ensureValidDateOrUndefined(maybeDate: any): Date | undefined;
declare function stringify(obj: any): string;
declare function checkProperty(object: any, propertyName: string, expectedType: string, required?: boolean): void;
export declare const Utils: {
isValidUrl: typeof isValidUrl;
getTypeName: typeof getTypeName;
toBase64: typeof toBase64;
fromBase64: typeof fromBase64;
sleep: typeof sleep;
isValidDateString: typeof isValidDateString;
reviver: typeof reviver;
ensureValidDateOrUndefined: typeof ensureValidDateOrUndefined;
stringify: typeof stringify;
checkProperty: typeof checkProperty;
};
export {};