punycode 0.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 46

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

example/punycode_example.dart

// 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:


dependencies:
  punycode: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages 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';
  
Version Uploaded Documentation Archive
0.1.0 Jan 8, 2019 Go to the documentation of punycode 0.1.0 Download punycode 0.1.0 archive
0.0.1 Jun 29, 2017 Go to the documentation of punycode 0.0.1 Download punycode 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
84
Overall:
Weighted score of the above. [more]
46
Learn more about scoring.

We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13+1

Platforms

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.

Dependencies

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