Skip to content

Commit

Permalink
docs: fixed outdated usage (bluesky-social#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinya Kato / 加藤 真也 authored Mar 20, 2023
1 parent a86bb28 commit 2fc0715
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/identifier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ Validation logic for AT identifiers - DIDs & Handles
```typescript
import * as identifier from '@atproto/identifier'

isValid('alice.test', ['.test']) // returns true
ensureValid('alice.test', ['.test']) // returns void
isValidHandle('alice.test') // returns true
ensureValidHandle('alice.test') // returns void

isValid('al!ce.test', ['.test']) // returns false
ensureValid('al!ce.test', ['.test']) // throws
isValidHandle('al!ce.test') // returns false
ensureValidHandle('al!ce.test') // throws

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

## License

MIT
MIT

0 comments on commit 2fc0715

Please sign in to comment.