variable iri

A string-to-IRI converter. Returns null if the string is not an IRI.

Examples

Example 1

const
anIrl = iri`https://çağlayan.info/user/çağlayan/`,
aUrn  = iri`urn:ietf:rfc:2648`;

anIrl instanceOf IRL; // true
anIrl instanceOf IRI; // true
aUrn instanceOf URN; // true
aUrn instanceOf IRI; // true

See

Usage

import { iri } from ".";