MEMORY CARD
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.
API
/**
* ES6 Map like Async API
*/
export interface AsyncMapLike<K = any, V = any> {
size: Promise<number>
[Symbol.asyncIterator](): AsyncIterableIterator<[K, V]>
entries() : AsyncIterableIterator<[K, V]>
keys () : AsyncIterableIterator<K>
values () : AsyncIterableIterator<V>
get (key: K) : Promise<V | undefined>
set (key: K, value: V) : Promise<void>
has (key: K) : Promise<boolean>
delete (key: K) : Promise<void>
clear () : Promise<void>
}
export class MemoryCard implements AsyncMapLike { ... }
MemoryCard
is an AsyncMapLike interface
1. load()
2. save()
3. destroy()
4. multiplex()
TODO
- Swagger API Backend Support
- toJSON Serializable with Metadata
CHANGELOG
master v1.1 (Nov 27, 2021)
- Fix #39 by update AsyncMapLike to v1.0
v1.0 (Nov 10, 2021)
- Release v1.0
- ES Module support
v0.13 (Aug, 2021)
- Move S3 & OBS to peer dependency to reduce install size
- Add Etcd Storage support
v0.6 master (Aug 2018)
- Support AWS S3 Cloud Storage
v0.4 July 2018
- Add
multiplex()
method to Multiplex MemoryStore to sub-MemoryStores.
v0.2 June 2018
- Unit Testing
- NPM Pack Testing
- DevOps to NPM with
@next
tag support for developing branch
v0.0 May 31st, 2018
- Promote
Profile
of Wechaty to SOLO NPM Module:MemoryCard
- Update the API to ES6
Map
-like, the difference is that MemoryCard is all Async.
AUTHOR
COPYRIGHT & LICENSE
- Code & Docs © 2017-now Huan LI <zixia@zixia.net>
- Code released under the Apache-2.0 License
- Docs released under Creative Commons