UNPKG

version-polling

Version:

A JavaScript library for web application updates

19 lines (18 loc) 647 B
export declare const noop: () => void; /** * 是否有值 */ export declare function isDef(val: unknown): val is {}; /** * 从HTML内容中提取指定chunk */ export declare function getChunkByHtml(htmlText: string, name?: string): string; /** * 比较两个版本号的大小 * @param v1 最新版本,格式为数字点分隔的字符串,如 '1.2.3' * @param v2 旧版本,格式同v1 * @see https://semver.org/lang/zh-CN/ */ export declare function compareSemanticVersion(v1: string, v2: string): 1 | -1 | 0; export declare function createWorker(fn: () => void): Worker; export declare function closeWorker(worker: Worker): void;