Latch.NSID (latch v0.5.0)

Copy Markdown

Namespaced identifiers are used in atproto to reference lexicons, XRPC endpoints, and more.

An example is: site.standard.document.

https://atproto.com/specs/nsid

Summary

Functions

Takes an NSID like site.standard.document and extracts the authority part, site.standard.

Takes an NSID like site.standard.document and extracts the last part, document.

Validates the NSID against the specification.

Functions

authority(nsid)

@spec authority(String.t()) :: String.t()

Takes an NSID like site.standard.document and extracts the authority part, site.standard.

name(nsid)

@spec name(String.t()) :: String.t()

Takes an NSID like site.standard.document and extracts the last part, document.

valid?(nsid)

@spec valid?(String.t()) :: boolean()

Validates the NSID against the specification.