variable irl

A string-to-IRL converter. Returns null if the string is not a IRL. An IRL is a non-standard yet useful way of representing URLs in Unicode.

Examples

Example 1

const anIrl = irl`https://çağlayan.info/user/çağlayan/`;

anIrl instanceOf IRL; // true
anIrl instanceOf IRI; // true
anIrl.href === 'https://çağlayan.info/user/çağlayan/'; // true
anIrl.url.href === 'https://xn--alayan-vua36b.info/user/%C3%A7a%C4%9Flayan/'; // true

See

Usage

import { irl } from ".";