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

Provide standard validation for identifier supported by AT Protocol to Dart/Flutter.

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
0
pub points
5%
popularity

Publisher

verified publisheratprotodart.com

Provide standard validation for identifier supported by AT Protocol to Dart/Flutter.

Homepage
Repository (GitHub)
View/report issues

Topics

#atproto #bluesky #util

Funding

Consider supporting this project:

github.com

License

unknown (LICENSE)

More

Packages that depend on at_identifier