@zero-version/key-value-storage

Key/value storage.

Usage no npm install needed!

<script type="module">
  import zeroVersionKeyValueStorage from 'https://cdn.skypack.dev/@zero-version/key-value-storage';
</script>

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!