Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 777 Bytes

File metadata and controls

15 lines (11 loc) · 777 Bytes

@dragongate/miniprogram-storage

Build Status npm version

API

  • config 全局配置
    • logger 日志配置
  • getStorage<TResult = unknown, TKey = string>(key: TKey, defaultValue?: TResult): Promise<TResult> 异步读取
  • setStorage<TData = unknown, TKey = string>(key: TKey, data: TData): Promise<{errMsg: string;}> 异步写入
  • removeStorage<Tkey = string>(key: Tkey):Promise<{errMsg: string;}> 异步删除
  • clearStorage():Promise<{errMsg: string;}> 异步清空
  • cache in memory