0.2.1 • Published 8 months ago

@atproto/identifier v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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

0.2.1

8 months ago

0.2.0

10 months ago

0.1.0

1 year ago