punycode 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 75

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 Nov 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:punycode/punycode.dart.

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. (-0.50 points)

Analysis of lib/src/punycode_base.dart reported 1 hint:

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

Format lib/punycode.dart.

Run dartfmt to format lib/punycode.dart.

Maintenance suggestions

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