vtils

Home > utils > LocalStoragePlus > decrease

LocalStoragePlus.decrease() method

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

Signature:

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

Parameters

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

Returns:

void