@zero-version/key-value-storage
v9.9.14
Published
Key/value storage.
Downloads
33
Maintainers
Readme
Key/value storage.
Usage
Using an interface allows for multiple implementations, as well as decorator or adapter implementations if needed. See the MemoryKeyValueStore for an example implementation.
IKeyValueStore
import type { IKeyValueStore } from '@zero-version/key-value-storage';
export class KeyValueStore implements IKeyValueStore {
public get(key: string) {
// Implement
}
public set(key: string, value: any) {
// Implement
}
public remove(key: string) {
// Implement
}
}
Support ☕
Are you using a package I've developed and finding it useful? Or have you looked at one of my repositories and learnt something new? If so, please consider buying me a coffee. Thanks!