GoodDB
    Preparing search index...
    • Get the type of a key

      Parameters

      • this: GoodDB
      • key: string

        The key to get the type of

      • Optionaloptions: methodOptions

        The options to use

      Returns string | Promise<string>

      A promise if the driver is async, otherwise a string

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