Viewing version 3.0.0-nullsafety.3. Open the latest package page.

more

3.0.0-nullsafety.3

More Dart — Literally. Collecting, iterating, caching, mathematics, matching, ordering, and formatting easily.

Download archive

Readme

More Dart — Literally

Pub Package Build Status Coverage Status GitHub Issues GitHub Forks GitHub Stars GitHub License

Various extensions that make Dart a better place:

  • async.dart provides numerous helpers to make async code better.
  • cache.dart is a collection of different caching strategies and their expiry policy.
  • char_matcher.dart is a model for character classes, their composition and operations on strings.
  • collection.dart is a collection of collection types: bi-map, bit-list, multi-set, set and list multi-map, range, and string.
  • feature.dart provides information about the runtime environment.
  • hash.dart combines multiple hash values.
  • iterable.dart is a collection of iterables and iterators.
  • math.dart is a collection of common mathematical functions.
  • number.dart provides fractional, complex and quaternion arithmetic.
  • ordering.dart a fluent interface for building comparator functions.
  • printer.dart a fluent interface for configuring sophisticated formatter.
  • tuple.dart a generic sequence of typed values.

And there are more to come ...

This library is open source, stable and well tested. Development happens on GitHub. Feel free to report issues or create a pull-request there. General questions are best asked on StackOverflow.

The package is hosted on dart packages. Up-to-date class documentation is created with every release.

Misc

Installation

Follow the installation instructions on dart packages.

Import the all-including parent package:

import 'package:more/more.dart';

Or one or more of the specific packages into your Dart code:

import 'package:more/async.dart';
import 'package:more/cache.dart';
import 'package:more/char_matcher.dart';
import 'package:more/collection.dart';
import 'package:more/hash.dart';
import 'package:more/iterable.dart';
import 'package:more/math.dart';
import 'package:more/number.dart';
import 'package:more/ordering.dart';
import 'package:more/printer.dart';
import 'package:more/tuple.dart';

Contributing

The goal of the library is to provide a loose collection of carefully curated utilities that are not provided by the Dart standard library. All features must be well tested. New features must have significant advantages over alternatives, such as code reduction, readability improvement, speed increase, memory reduction, or improved accuracy. In case of doubt, consider filing a feature request before filing a pull request.

History

This library started in April 2013 as I was working through the puzzles of Project Euler and encountered some missing features in Dart. Over time the library grew and became more useful in many other places, so I created this reusable library.

Some parts of this library are inspired by similar APIs in Google Guava (Google core libraries for Java) and Apache Commons (a repository of reusable Java components).

License

The MIT License, see LICENSE.

Changelog

Changelog

3.0.0-nullsafety

  • Dart 2.10 requirement and null-safety.
  • Use package:clock and package:fake_async across the board.
  • Add BigIntRange and optimize iteration of IntegerRange.
  • Optimize the implementation of ExpiryCache.
  • Fix maxAge of the Stream.buffer operator.
  • Add Fraction.sign and Complex.sign.
  • Add IterablePrinter to print lists.
  • CharMatcher is now a Pattern.
  • Add package:more/feature.dart.
  • Add Trie (prefix tree) collection type.

2.8.0

  • Dart 2.9 compatibility and requirement (in preparation of null-safety).
  • Remove Iterable.concat() in favor of Iterable.flatten().
  • Split Iterable.zip() into Interable.zip(), Iterable.zipPartial() and Iterable.zipPartialWith().
  • Fix a bug in Ordering.nullsFirst and Ordering.nullsLast.
  • Fix a race condition in cache value resolution.
  • Fix a rounding bug of numeric formats with precision 0.
  • Add human number printer (1 kilo, 1 mega, ...).
  • Add a map function to Tuple classes.

2.7.0

  • Add separatedBy, flatMap and flatten function on Iterable.
  • Cleanup printer package and improve documentation.

2.6.0

  • Add repeat function on Iterable.
  • Improved documentation.

2.5.0

  • Printer package correctly trims, pads and separates unicode strings now.
  • Updated class documentation regarding UTF-16 representation vs unicode strings.

2.4.0

  • Add in-place logical operators to BitList.
  • Optimize CharMatcher with lookup tables.
  • Improved documentation.

2.3.0

  • Add ListMultimap and SetMultimap.
  • Mark CharMatcher, Cache and Ordering as immutable.
  • Improve documentation, which still included pre Dart 2.0 examples.
  • Add extension methods to convert Comparator to Ordering.

2.2.0

  • Made truncateToPeriod and periodical extension methods of DateTime.
  • Add extension methods to convert
    • a Map<K, V> to a BiMap<K, V>,
    • an Iterable<bool> to a BitList, and
    • an Iterable<T> to a Multiset<T>.

2.1.0

  • Cleanup Tuple class to be more readable and better typed.

2.0.0

  • Dart 2.7 compatibility and requirement.
  • Cleaned up deprecated code.
  • Iterables
    • Converted most helpers to extension methods.
    • Removed fold and fib, as they are not generally useful.
    • Moved digits to package:more/math.
  • Collections
    • Add extension method to int and double to create ranges, i.e. 0.to(20).
    • Move the string lists to String.toList() extension method.
  • Math
    • Move all numerical operators to num, ìnt and/or BigInt (new).

1.18.0

  • Dart 2.4 compatibility and requirement.
  • Add a tuple data type.

1.17.0

  • Dart 2.3 compatibility and requirement.
  • Various code improvements and optimizations.

1.16.0

  • Dart 2.2 compatibility and requirement.

1.15.0

  • Deprecated package:more/int_math package, and moved all not-deprecated code to package:more/math.dart.
  • Add 'polyfills' for hyperbolic functions to the math package.
  • Add functionality for combining hash codes.

1.14.0

  • Quaternion numbers.

1.13.0

  • Rename Range.stop to Range.end to be consistent with Dart naming conventions.
  • Rename partition to chunked to be more consistent with Dart nomenclature.
  • Add the zip iterable.

1.12.0

  • Add the number package.
    • Move Fraction class into this package.
    • Add support for Complex numbers.
  • Add the groupBy iterable.

1.11.0

  • Add the printer package.

1.10.0

  • Drop Dart 1.0 compatibility.

1.9.0

  • Dart 2.0 strong-mode compatibility required the following breaking changes:
    • Replace callers of range() with either IntegerRange() or DoubleRange().
    • Removed padding argument from partition(). To migrate replace broken calls-sites with partitionWithPadding().

1.8.1

  • Removed empty(), emptyIterator(), emptyIterable() since these are part of the core library now.
  • Add periodic iterable tools (monthly, weekly, daily, hourly, ...).

1.8.0

  • Ordering.reversed, Ordering.nullsFirst, Ordering.nullsLast, and Ordering.lexicographical are now properties for consistency with the Iterable protocol.
  • Various optimization and improvements on the Range class.

1.7.2

  • Cleanup after micro library migration.
  • Move to the latest Dart provided mixins.

1.7.1

  • Cleanup after micro library migration.
  • Address linter warnings.
  • Better test coverage.

1.7.0

  • Migrate to micro libraries.
  • Add caching library.

1.6.0

  • Use generic method syntax.

1.5.3

  • Fix pubspec SDK constraints.

1.5.2

  • Fix linter warnings.
  • Improve documentation.

1.5.1

  • Strong compiler compliant.

1.5.0

  • Fix various typos and linter issues.
  • Reformat documentation.

1.4.0

  • Migrate to Travis.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'more:3.0.0-nullsafety.3'
pubspec.yaml
name: more
version: 3.0.0-nullsafety.3

homepage: https://github.com/renggli/dart-more
description: More Dart — Literally. Collecting, iterating, caching, mathematics,
  matching, ordering, and formatting easily.

environment:
  sdk: '>=2.12.0-0 <3.0.0'
dependencies:
  characters: ^1.1.0-nullsafety
  clock: ^1.1.0-nullsafety
  collection: ^1.15.0-nullsafety
  meta: ^1.3.0-nullsafety
dev_dependencies:
  fake_async: ^1.2.0-nullsafety
  test: ^1.16.0-nullsafety

Version history

VersionPublishedArchiveSHA-256
0.5.0Cached · Upstream SHA-256 matchedDownloadc711fa3a…b6893b
0.5.1Cached · Upstream SHA-256 matchedDownload20a1f701…7a532f
0.5.2Cached · Upstream SHA-256 matchedDownloadb3047d52…b28936
0.5.3Cached · Upstream SHA-256 matchedDownload8e7e3462…40d41f
0.5.4Cached · Upstream SHA-256 matchedDownloada9b74a76…97c2cf
0.5.5Cached · Upstream SHA-256 matchedDownload48c25409…9ff4f9
0.5.6Cached · Upstream SHA-256 matchedDownloadab34fd0d…31f7ff
0.5.7Cached · Upstream SHA-256 matchedDownloadfeaa8995…56d81f
0.5.8Cached · Upstream SHA-256 matchedDownloadf65f697d…cf1e7a
0.5.9Cached · Upstream SHA-256 matchedDownloadbc2229b0…0f1ff2
0.5.10Cached · Upstream SHA-256 matchedDownloadffd71813…3c9238
0.5.11Cached · Upstream SHA-256 matchedDownloada231b640…bd4d74
0.5.12Cached · Upstream SHA-256 matchedDownloadaea66a7f…897dfd
0.5.13Cached · Upstream SHA-256 matchedDownload29d4dd5b…0ce03d
0.5.14Cached · Upstream SHA-256 matchedDownloade158416e…c941ec
0.5.15Cached · Upstream SHA-256 matchedDownload487059a4…123713
0.5.16Cached · Upstream SHA-256 matchedDownload5d60a8ef…8d3632
0.5.17Cached · Upstream SHA-256 matchedDownload4bc67f7f…9b50c7
0.5.18Cached · Upstream SHA-256 matchedDownload4c9f706b…2239e6
0.5.19Cached · Upstream SHA-256 matchedDownload102727f6…34cd5e
0.5.20Cached · Upstream SHA-256 matchedDownload216b44a1…bbf58c
0.5.21Cached · Upstream SHA-256 matchedDownload0964e19d…420f3c
0.5.22Cached · Upstream SHA-256 matchedDownloade6d01523…1fcda5
1.0.0Cached · Upstream SHA-256 matchedDownloadbeb3a1ab…35e96d
1.0.1Cached · Upstream SHA-256 matchedDownloadb79ad89c…818d9b
1.0.2Cached · Upstream SHA-256 matchedDownload7f846972…414bc8
1.0.3Cached · Upstream SHA-256 matchedDownloadd42360b6…9af7fd
1.0.4Cached · Upstream SHA-256 matchedDownload930f4e1a…916c90
1.1.0Cached · Upstream SHA-256 matchedDownload1e149824…7a3b57
1.1.1Cached · Upstream SHA-256 matchedDownload0f6fcdf6…98c2ed
1.2.0Cached · Upstream SHA-256 matchedDownload14fb1b11…97ebd7
1.2.1Cached · Upstream SHA-256 matchedDownload07a123eb…649576
1.3.1Cached · Upstream SHA-256 matchedDownloada0c2411e…25b35e
1.3.2Cached · Upstream SHA-256 matchedDownload5cc15487…2b724d
1.3.3Cached · Upstream SHA-256 matchedDownload563a4f1e…77b39e
1.3.4Cached · Upstream SHA-256 matchedDownload035d3b18…c8780d
1.3.5Cached · Upstream SHA-256 matchedDownload4a357f24…e0b50c
1.3.6Cached · Upstream SHA-256 matchedDownload814095d3…dc2878
1.3.7Cached · Upstream SHA-256 matchedDownload81489fac…8aa48e
1.4.0Cached · Upstream SHA-256 matchedDownloadca91d816…b7488e
1.5.0Cached · Upstream SHA-256 matchedDownload3d6263d3…deacf8
1.5.1Cached · Upstream SHA-256 matchedDownload56c738e3…25ae23
1.5.3Cached · Upstream SHA-256 matchedDownloada87e31f6…c907ab
1.6.0Cached · Upstream SHA-256 matchedDownload39755382…270558
1.7.0Cached · Upstream SHA-256 matchedDownload4ce40583…f71c95
1.7.1Cached · Upstream SHA-256 matchedDownload03b217cb…7a135b
1.7.2Cached · Upstream SHA-256 matchedDownload858df3db…7f1d34
1.8.0Cached · Upstream SHA-256 matchedDownload59311c8f…ebf899
1.8.1Cached · Upstream SHA-256 matchedDownload8b1a54e8…50230c
1.9.0Cached · Upstream SHA-256 matchedDownloadd23f4d73…46b6a4
1.9.1Cached · Upstream SHA-256 matchedDownload01d0a9e7…81a187
1.9.2Cached · Upstream SHA-256 matchedDownload387b5a7b…5afbec
1.10.0Cached · Upstream SHA-256 matchedDownload9df82e09…da4d78
1.10.1Cached · Upstream SHA-256 matchedDownloaded690174…a105b9
1.11.0Cached · Upstream SHA-256 matchedDownloadb4b98775…0dc9ea
1.11.1Cached · Upstream SHA-256 matchedDownload39a32a11…0e1ddd
1.11.2Cached · Upstream SHA-256 matchedDownload4c9a1e48…eaa498
1.11.3Cached · Upstream SHA-256 matchedDownloadb5fb3ce9…814c22
1.11.4Cached · Upstream SHA-256 matchedDownload1c93e449…d84444
1.11.5Cached · Upstream SHA-256 matchedDownload69265847…19a825
1.12.0Cached · Upstream SHA-256 matchedDownload45d10e83…e2849d
1.12.1Cached · Upstream SHA-256 matchedDownload58bcc12b…3751c2
1.13.0Cached · Upstream SHA-256 matchedDownload0a030553…96d3ef
1.14.0Cached · Upstream SHA-256 matchedDownload89efb483…2e8045
1.14.1Cached · Upstream SHA-256 matchedDownload987c50ed…4718f5
1.14.2Cached · Upstream SHA-256 matchedDownloadcaa502be…96908f
1.15.0Cached · Upstream SHA-256 matchedDownload23f5f06c…390dc1
1.16.0Cached · Upstream SHA-256 matchedDownloadadfc569c…ffc95b
1.17.0Cached · Upstream SHA-256 matchedDownload90715e4a…bab70e
1.18.0Cached · Upstream SHA-256 matchedDownload06155c81…898365
1.18.1Cached · Upstream SHA-256 matchedDownload08443d6f…4a03bb
1.18.2Cached · Upstream SHA-256 matchedDownloadd79e2fa8…953317
2.0.0Cached · Upstream SHA-256 matchedDownload6250a80a…a721d0
2.0.1Cached · Upstream SHA-256 matchedDownloadbdee0665…7f1a20
2.1.0Cached · Upstream SHA-256 matchedDownload5a15f85a…46031a
2.2.0Cached · Upstream SHA-256 matchedDownload45f11eae…d19d1f
2.3.0Cached · Upstream SHA-256 matchedDownload2df9a577…c806f4
2.3.1Cached · Upstream SHA-256 matchedDownload83f8f5eb…8e10cd
2.4.0Cached · Upstream SHA-256 matchedDownload6f51929d…0f57b9
2.5.0Cached · Upstream SHA-256 matchedDownload2de13a96…5abed4
2.6.0Cached · Upstream SHA-256 matchedDownload0ab9cf5a…e11a68
2.7.0Cached · Upstream SHA-256 matchedDownloadcaa4efdf…a71c41
2.8.0-nullsafetyCached · Upstream SHA-256 matchedDownload744ee5f8…4d4421
2.8.0Cached · Upstream SHA-256 matchedDownload3d63c062…0a6231
3.0.0-nullsafetyCached · Upstream SHA-256 matchedDownload768d231c…6f0ab5
3.0.0-nullsafety.1Cached · Upstream SHA-256 matchedDownload144f662d…2ec6c1
3.0.0-nullsafety.2Cached · Upstream SHA-256 matchedDownloadc979cc8a…d0aa6f
3.0.0-nullsafety.3Cached · Upstream SHA-256 matchedDownloadf5de8962…620ef4
3.0.0-nullsafety.4Cached · Upstream SHA-256 matchedDownloadff99d1e4…f2f0f7
3.0.0-nullsafety.5Cached · Upstream SHA-256 matchedDownloadb38abecc…e6fd04
3.0.0-nullsafety.6Cached · Upstream SHA-256 matchedDownload8b929cb7…584294
3.0.0Cached · Upstream SHA-256 matchedDownload537e19f8…dffcd4
3.0.1Cached · Upstream SHA-256 matchedDownload5dff5f5e…e201be
3.1.0Cached · Upstream SHA-256 matchedDownload0e5578e3…86337c
3.2.0Cached · Upstream SHA-256 matchedDownloadc42d0b90…16abae
3.2.1Cached · Upstream SHA-256 matchedDownloadf599a38a…cce18d
3.3.0Cached · Upstream SHA-256 matchedDownloadeeaefcad…f5b1ef
3.4.0Cached · Upstream SHA-256 matchedDownloadceede94f…097a37
3.5.0Cached · Upstream SHA-256 matchedDownload7fd89490…24a403
3.6.0Cached · Upstream SHA-256 matchedDownload3e48a16f…e1f26b
3.7.0Cached · Upstream SHA-256 matchedDownloadc29b3174…81826f
3.7.1Cached · Upstream SHA-256 matchedDownload791ddaea…448c19
3.8.0Cached · Upstream SHA-256 matchedDownload3f77263f…80b831
3.8.1Cached · Upstream SHA-256 matchedDownloade3d1e763…1416fc
3.8.2Cached · Upstream SHA-256 matchedDownload375f4b2f…031e3d
3.8.3Cached · Upstream SHA-256 matchedDownloadb97a0f6d…14cfb2
3.8.4Cached · Upstream SHA-256 matchedDownload3e82576b…82f664
3.8.5Cached · Upstream SHA-256 matchedDownloadfd60723e…735d7a
3.9.0Cached · Upstream SHA-256 matchedDownload9a4a26c4…58510f
3.9.1Cached · Upstream SHA-256 matchedDownloaddde79beb…185f88
3.9.2Cached · Upstream SHA-256 matchedDownloadd86e5433…e87237
3.9.3Cached · Upstream SHA-256 matchedDownload3dea13f1…18915b
3.9.4Cached · Upstream SHA-256 matchedDownload838a907c…284b4f
3.9.5Cached · Upstream SHA-256 matchedDownload01dd74e1…0ab17b
3.10.0Cached · Upstream SHA-256 matchedDownloadac5565aa…ec07de
3.10.1Cached · Upstream SHA-256 matchedDownload14853a9f…4dc428
3.10.2Cached · Upstream SHA-256 matchedDownloadad9207a4…8b7c82
4.0.0Cached · Upstream SHA-256 matchedDownload74d73795…3a2dc3
4.0.1Cached · Upstream SHA-256 matchedDownloada06e9e78…000c5a
4.1.0Cached · Upstream SHA-256 matchedDownload38e3dbee…e942df
4.2.0Cached · Upstream SHA-256 matchedDownloadb9372ef1…946108
4.3.0Cached · Upstream SHA-256 matchedDownload55cb4f27…3a4ebd
4.4.0Cached · Upstream SHA-256 matchedDownload7589f39d…25efad
4.5.0Cached · Upstream SHA-256 matchedDownloadd3908d71…9ca375
4.6.0Cached · Upstream SHA-256 matchedDownload30acaca0…33cbf4
4.6.1Cached · Upstream SHA-256 matchedDownload3850edf0…2e1872
4.7.0Cached · Upstream SHA-256 matchedDownloade252628d…6ac5ba
4.8.0Cached · Upstream SHA-256 matchedDownloadebd84535…46562b
4.8.1Cached · Upstream SHA-256 matchedDownload53e60f96…d70cf7
4.8.2Cached · Upstream SHA-256 matchedDownload59f5986c…b813d0

Dependencies

characters "^1.1.0-nullsafety"

clock "^1.1.0-nullsafety"

collection "^1.15.0-nullsafety"

meta "^1.3.0-nullsafety"