rollun-ts-datastore
Version:
rollun-datastore written in TS
19 lines (18 loc) • 500 B
TypeScript
export interface LifecycleTokenStorage {
getItem: (name: string) => string | null;
setItem: (key: string, value: string) => void;
}
export interface Options {
tokenName?: string;
charset?: string;
tokenLength?: number;
}
export default class BrowserLifecycleToken {
private storage;
private name;
private charset;
private tokenLength;
constructor(storage: LifecycleTokenStorage, options?: Options);
generateAndSetToken(): string;
get Name(): string;
}