# MEMORY CARD [![NPM Version](https://img.shields.io/npm/v/memory-card?color=brightgreen)](https://www.npmjs.com/package/memory-card) [![npm (next)](https://img.shields.io/npm/v/memory-card/next.svg)](https://www.npmjs.com/package/memory-card?activeTab=versions) [![GitHub Action](https://github.com/huan/memory-card/workflows/NPM/badge.svg)](https://github.com/huan/memory-card/actions?query=workflow%3ANPM) [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-blue.svg)](https://www.typescriptlang.org/) Memory Card is an Easy to Use Key/Value Store, with Swagger API Backend & Serialization Support. - It is design for using in distribution scenarios. - It is NOT design for performance. ![Memory Card](https://huan.github.io/memory-card/images/memory-card-logo.png) ## API ```ts /** * ES6 Map like Async API */ export interface AsyncMapLike { size: Promise [Symbol.asyncIterator](): AsyncIterableIterator<[K, V]> entries() : AsyncIterableIterator<[K, V]> keys () : AsyncIterableIterator values () : AsyncIterableIterator get (key: K) : Promise set (key: K, value: V) : Promise has (key: K) : Promise delete (key: K) : Promise clear () : Promise } export class MemoryCard implements AsyncMapLike { ... } ``` > `MemoryCard` is an [AsyncMapLike](https://github.com/huan/async-map-like) interface ### 1. load() ### 2. save() ### 3. destroy() ### 4. multiplex() ## TODO 1. Swagger API Backend Support 1. toJSON Serializable with Metadata ## CHANGELOG ### master v1.1 (Nov 27, 2021) 1. Fix [#39](https://github.com/huan/memory-card/issues/39) by update [AsyncMapLike](https://github.com/huan/async-map-like) to v1.0 ### v1.0 (Nov 10, 2021) 1. Release v1.0 1. ES Module support ### v0.13 (Aug, 2021) 1. Move S3 & OBS to peer dependency to reduce install size 1. Add Etcd Storage support ### v0.6 master (Aug 2018) 1. Support AWS S3 Cloud Storage ### v0.4 July 2018 1. Add `multiplex()` method to Multiplex MemoryStore to sub-MemoryStores. ### v0.2 June 2018 1. Unit Testing 1. NPM Pack Testing 1. DevOps to NPM with `@next` tag support for developing branch ### v0.0 May 31st, 2018 1. Promote `Profile` of Wechaty to SOLO NPM Module: `MemoryCard` 1. Update the API to ES6 `Map`-like, the difference is that MemoryCard is all **Async**. ## AUTHOR [Huan LI](http://linkedin.com/in/zixia) \ profile for zixia at Stack Overflow, Q&A for professional and enthusiast programmers ## COPYRIGHT & LICENSE - Code & Docs © 2017-now Huan LI \ - Code released under the Apache-2.0 License - Docs released under Creative Commons