@yupio/atproto-identifier
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Identifier

Validation logic for AT identifiers - DIDs & Handles

Usage

import * as identifier from '@atproto/identifier'

isValidHandle('alice.test') // returns true
ensureValidHandle('alice.test') // returns void

isValidHandle('al!ce.test') // returns false
ensureValidHandle('al!ce.test') // throws

ensureValidDid('did:method:val') // returns void
ensureValidDid(':did:method:val') // throws

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @yupio/atproto-identifier

Weekly Downloads

47

Version

0.1.1

License

MIT

Unpacked Size

130 kB

Total Files

22

Last publish

Collaborators

  • yupalan
  • vernonjohnson23