GoodDB
    Preparing search index...
    • Pull a value from a key

      Parameters

      • this: GoodDB
      • key: string

        The key to pull the value from

      • valueOrCallback: (e: any, i: number, a: any) => any

        The value or callback to use to pull the value

      • OptionalpullAll: boolean

        Whether to pull all the values or just the first

      • Optionaloptions: methodOptions

        The options to use

      Returns boolean | Promise<boolean>

      A promise if the driver is async, otherwise a boolean

      const db = new GoodDB(new JSONDriver({
      path: './database.json'
      }));
      db.pull('key', 'value');
      const db = new GoodDB(new MongoDBDriver({
      uri: "..."
      }));
      await db.connect();
      await db.pull('key', 'value');