stores
    Preparing search index...

    A blockstore backed by the file system

    Implements

    Index

    Constructors

    Properties

    path: string

    Methods

    • Retrieve values for the passed keys

      Parameters

      Returns AsyncGenerator<Pair>

      for await (const { key, value } of store.getMany([new Key('awesome')])) {
      console.log(`got "${key}" = "${new TextDecoder('utf8').decode(value)}"`')
      // => got "/awesome" = "datastore"
      }
    • Check for the existence of a value for the passed key

      Parameters

      Returns Promise<boolean>

      const exists = await store.has(new Key('awesome'))

      if (exists) {
      console.log('it is there')
      } else {
      console.log('it is not there')
      }