@metreeca/core - v0.13.0
    Preparing search index...

    Function isCURIE

    • Checks if a value is a valid compact URI.

      Accepts prefixed names made of a prefix, a colon and a local name, such as rdfs:label or :label. Prefixes follow the rules enforced by createLexicon and local names the rules described for Lexicon. The check is purely syntactic and accepts any well-formed prefix, whether declared in a lexicon or otherwise.

      Parameters

      • value: unknown

        The value to validate as a compact URI

      Returns value is string

      true if value is a string made of a prefix, possibly empty, a colon and a local name; false otherwise

      This function serves as a type guard, narrowing the type from unknown to CURIE in conditional checks.

      CURIE