bson 0.3.2

bson #

Build Status

Bson library for Dart programming language

Use this package as a library

1. Depend on it

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


dependencies:
  bson: ^0.3.2

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:bson/bson.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
75
Health:
Code health derived from static analysis. [more]
87
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
32
Overall:
Weighted score of the above. [more]
70
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

Platforms

Detected platforms: Flutter, web, other

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

Health issues and suggestions

Document public APIs. (-0.66 points)

262 out of 265 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/bson_type.dart. (-8.17 points)

Analysis of lib/src/bson_type.dart reported 17 hints, including:

line 2 col 1: Prefer using /// for doc comments.

line 5 col 1: Prefer using /// for doc comments.

line 8 col 1: Prefer using /// for doc comments.

line 11 col 1: Prefer using /// for doc comments.

line 14 col 1: Prefer using /// for doc comments.

Fix lib/src/types/regexp.dart. (-2.48 points)

Analysis of lib/src/types/regexp.dart reported 5 hints:

line 13 col 42: Use = to separate a named parameter from its default value.

line 13 col 70: Use = to separate a named parameter from its default value.

line 13 col 89: Use = to separate a named parameter from its default value.

line 13 col 110: Use = to separate a named parameter from its default value.

line 13 col 130: Use = to separate a named parameter from its default value.

Fix lib/src/types/binary.dart. (-1.99 points)

Analysis of lib/src/types/binary.dart reported 4 hints:

line 86 col 9: Use isNotEmpty instead of length

line 148 col 43: Use = to separate a named parameter from its default value.

line 148 col 57: Use = to separate a named parameter from its default value.

line 148 col 85: Use = to separate a named parameter from its default value.

Fix additional 16 files with analysis or formatting issues. (-0.50 points)

Additional issues in the following files:

  • lib/src/types/objectid.dart (1 hint)
  • lib/bson.dart (Run dartfmt to format lib/bson.dart.)
  • lib/src/bson_impl.dart (Run dartfmt to format lib/src/bson_impl.dart.)
  • lib/src/statics.dart (Run dartfmt to format lib/src/statics.dart.)
  • lib/src/types/array.dart (Run dartfmt to format lib/src/types/array.dart.)
  • lib/src/types/boolean.dart (Run dartfmt to format lib/src/types/boolean.dart.)
  • lib/src/types/date.dart (Run dartfmt to format lib/src/types/date.dart.)
  • lib/src/types/dbpointer.dart (Run dartfmt to format lib/src/types/dbpointer.dart.)
  • lib/src/types/dbref.dart (Run dartfmt to format lib/src/types/dbref.dart.)
  • lib/src/types/double.dart (Run dartfmt to format lib/src/types/double.dart.)
  • lib/src/types/int.dart (Run dartfmt to format lib/src/types/int.dart.)
  • lib/src/types/map.dart (Run dartfmt to format lib/src/types/map.dart.)
  • lib/src/types/min_max_keys.dart (Run dartfmt to format lib/src/types/min_max_keys.dart.)
  • lib/src/types/null.dart (Run dartfmt to format lib/src/types/null.dart.)
  • lib/src/types/string.dart (Run dartfmt to format lib/src/types/string.dart.)
  • lib/src/types/timestamp.dart (Run dartfmt to format lib/src/types/timestamp.dart.)

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Use analysis_options.yaml. (-10 points)

Change the name of your package's .analysis_options file to analysis_options.yaml.

Read more about the setup of analysis-options.yaml.

Package is getting outdated. (-28.49 points)

The package was last published 67 weeks ago.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and bson.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.69.2 <3.0.0
fixnum ^0.10.8 0.10.11
more ^1.9.2 1.18.2
Transitive dependencies
collection 1.14.12
Dev dependencies
test ^1.3.0