JSPM

ilp-store-wrapper

2.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 762
    • Score
      100M100P100Q70578F
    • License ISC

    Package Exports

    • ilp-store-wrapper

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ilp-store-wrapper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    ILP Store Wrapper

    Synchronous wrapper around ILP store

    The constructor takes an ILP store.

    const wrappedStore = new StoreWrapper(store)
    • .load(key) -> Promise<null> will read a key asynchronously into the cache.
    • .get(key) -> value will synchronously read from the cache.
    • .set(key, value) -> null will synchronously write to the cache and queue a write to the store (with order guaranteed).
    • .delete(key) -> null will synchronously delete from the cache and queue a delete to the store (with order guaranteed).
    • .setCache(key, value) -> null will synchronously write to the cache and NOT queue any write to the store.