punycode 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 71

punycode #

Direct translation of the C algorithm in RFC 3492 to dart.

Stringprep / PRECIS #

This library does not implement stringprep (RFC 3454) or PRECIS (RFC 7564).

Those RFCs are needed for domain name conversion.

Changelog #

0.1.0 #

  • dart2

0.0.1 #

  • Initial version, created by Stagehand


// Copyright (c) 2017, cl. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:punycode/punycode.dart';

void main() {
  const unicode = 'B├╝cher';
  var encoded = punycodeEncode(unicode);
  print('$unicode encoded is $encoded');

Use this package as a library

1. Depend on it

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

  punycode: ^0.1.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:punycode/punycode.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.9+1

Health issues and suggestions

Document public APIs. (-1 points)

3 out of 3 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/punycode_base.dart. (-3.45 points)

Analysis of lib/src/punycode_base.dart reported 7 hints, including:

line 129 col 58: Use = to separate a named parameter from its default value.

line 132 col 31: Unnecessary new keyword.

line 276 col 22: Unnecessary new keyword.

line 311 col 13: Unnecessary new keyword.

line 347 col 15: Unnecessary new keyword.

Format lib/punycode.dart.

Run dartfmt to format lib/punycode.dart.

Maintenance suggestions

Package is getting outdated. (-47.95 points)

The package was last published 77 weeks ago.

The package description is too short. (-16 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <3.0.0
Dev dependencies
test >0.12.0 <2.0.0