variable urn

A string-to-URN converter. Returns null if the string is not a URN.

Examples

Example 1

const aUrn = urn`urn:ietf:rfc:2648`;

aUrn instanceOf URN; // true
aUrn instanceOf IRI; // true
aUrn.namespace === 'ietf'; // true
aUrn.namespaceSpecific === 'rfc:2648'; // true

See

Usage

import { urn } from ".";