hasAPI

function hasAPI(): boolean

Checks whether a shared ExtendedMetadataCache instance exists for the current API major version, without creating one.

Returns

booleantrue if another plugin has already called getAPI.

Example

import { hasAPI } from "obsidian-extended-metadatacache";
 
if (hasAPI()) {
  console.log("Extended cache is already initialized by another plugin");
}