saslprep 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 61

saslprep-dart #

This package provides the Stringprep (rfc4013) Profile for User Names and Passwords for dart. A port of https://github.com/reklatsmasters/saslprep to the dart lang

1.0.0 #

example/main.dart

import 'package:saslprep/saslprep.dart';

void main() {
  // password
  print(Saslprep.saslprep('password\u00AD'));
  // No error due to unassigned character
  print(Saslprep.saslprep('password\u0487', options: SaslprepOptions(true)));
  // Error due to unassigned character
  print(Saslprep.saslprep('password\u0487'));
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  saslprep: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:saslprep/saslprep.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
26
Health:
Code health derived from static analysis. [more]
94
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

We analyzed this package on Mar 30, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/src/saslprep.dart. (-6.31 points)

Analysis of lib/src/saslprep.dart reported 13 hints, including:

line 40 col 34: Don't explicitly initialize variables to null.

line 48 col 30: Use contains instead of indexOf

line 53 col 28: Use contains instead of indexOf

line 62 col 29: Use contains instead of indexOf

line 65 col 13: Unnecessary new keyword.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
unorm_dart ^0.1.2 0.1.2
Dev dependencies
test ^1.12.0