at_identifier 0.2.2 copy "at_identifier: ^0.2.2" to clipboard
at_identifier: ^0.2.2 copied to clipboard

Core library for the syntax in the AT Protocol standard.

example/example.dart

// Copyright 2023 Shinya Kato. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

import 'package:at_identifier/at_identifier.dart' as identifier;

void main(List<String> args) {
  identifier.isValidHandle('alice.test'); // returns true
  identifier.ensureValidHandle('alice.test'); // returns void

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

  identifier.ensureValidDid('did:method:val'); // returns void
  identifier.ensureValidDid(':did:method:val'); // throws
}
0
likes
150
pub points
5%
popularity

Publisher

verified publisheratprotodart.com

Core library for the syntax in the AT Protocol standard.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#atproto #bluesky #util

Documentation

API reference

Funding

Consider supporting this project:

github.com

License

BSD-3-Clause (LICENSE)

More

Packages that depend on at_identifier