ISNI (International Standard Name Identifier) scheme.
See https://en.wikipedia.org/wiki/International_Standard_Name_Identifier
Summary
Functions
Builds a URI for the given ISNI.
Checks whether a string is an ISNI.
Normalizes an ISNI.
Checks whether a string starts with an ISNI prefix.
Functions
Builds a URI for the given ISNI.
Examples
iex> IDUtils.Schemes.ISNI.build_uri("000000012146438X")
{:ok, %URI{scheme: "https", host: "isni.org", path: "/isni/000000012146438X", port: 443}}
Checks whether a string is an ISNI.
Examples
iex> IDUtils.Schemes.ISNI.match?("000000012146438X")
true
iex> IDUtils.Schemes.ISNI.match?("0000000121464380")
false
Normalizes an ISNI.
Examples
iex> IDUtils.Schemes.ISNI.normalize("ISNI 0000 0001 2146 438X")
{:ok, "000000012146438X"}
iex> IDUtils.Schemes.ISNI.normalize("https://isni.org/isni/000000012146438X")
{:ok, "000000012146438X"}
iex> IDUtils.Schemes.ISNI.normalize("0000 0001 2146 438X")
{:ok, "000000012146438X"}
Checks whether a string starts with an ISNI prefix.
Examples
iex> IDUtils.Schemes.ISNI.prefix?("https://isni.org/isni/000000012146438X")
true
iex> IDUtils.Schemes.ISNI.prefix?("ISNI 0000 0001 2146 438X")
true
iex> IDUtils.Schemes.ISNI.prefix?("000000012146438X")
false