UNPKG

626 BTypeScriptView Raw
1import { CacheConfig } from '../types';
2/**
3 * Default cache config
4 */
5export declare const defaultConfig: CacheConfig;
6/**
7 * return the byte size of the string
8 * @param str
9 */
10export declare function getByteLength(str: string): number;
11/**
12 * get current time
13 */
14export declare function getCurrTime(): number;
15/**
16 * check if passed value is an integer
17 */
18export declare function isInteger(value: any): boolean;
19export declare class CacheObject {
20 static clear(): void;
21 static getItem(key: string): string | null;
22 static setItem(key: string, value: string): void;
23 static removeItem(key: string): void;
24}