vtils

Home > utils > LocalStoragePlus > increase

LocalStoragePlus.increase() method

将本地存储的值增加给定值,若本地存储不存在,则初始化为 0 后操作。

Signature:

static increase(key: string, value?: number, options?: LocalStoragePlusSetOptions): void;

Parameters

Parameter Type Description
key string
value number (Optional) 增加值,默认 1
options LocalStoragePlusSetOptions (Optional) 选项

Returns:

void