Skip to content

MS-DG/miniprogram-storage

Repository files navigation

@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