more 3.8.2 
more: ^3.8.2 copied to clipboard
More Dart — Literally. Collecting, iterating, caching, mathematics, matching, ordering, and formatting easily.
Changelog #
3.8.0 #
- Add 
Stringextensionstake,takeTo,skip,skipTo,takeLast,takeLastTo,skipLast, andskipLastTo. - Add the ability to measure the length of 
Interval<num>withtoIntLength()andtoDoubleLength(). - Create a new 
temporalpackage unifying allDateTimeandDurationrelated extensions:- Moved 
DateTime.periodicalandDateTime.truncateto the new page, deprecated the old code. - Add various convenience accessors to 
DateTime:isLeapYear,daysInYear,daysInMonth,weeksInYear,quarter,weekYear,weekNumber,dayOfYear, andhour12. - Add ability to convert 
Durationobjects to one or more (fractional)TimeUnits. - Add ability to convert 
Interval<DateTime>to aDuration. 
 - Moved 
 - Countless improvements and extensions to the 
printerpackage:- Add 
DateTimePrinterto print date and time objects. - Add 
OrdinalNumberPrinterto print ordinal numbers: 1st, 2nd, 3rd, 4th, ... - Add 
Printer.switcherto use different printers based on conditions. - Add 
Printer.whereto condition the printing on the printed object. - Add 
Printersupport fortake,skip,takeLastandskipLast. - Add 
Printersupport fortruncateRight,truncateLeft, andtruncateCenterto also operate on word and sentence boundaries. Include the ellipsis in the width constraint. - Deprecated 
Printer.map, and replace with more common and intention revealingPrinter.onResultOf. 
 - Add 
 - Implement the functionality of 
Orderingas static extensions methods onComparatorfunctions:- Add 
Comparator.binarySearchLowerandComparator.binarySearchUpperto return a lower/upper insertion index. - Add 
Comparator.largestandComparator.smallestto return the top/bottom-k elements. - Deprecate the 
Orderingclass and package. 
 - Add 
 - Added 
SortedListcollection type. - Add 
CompareOperatorsmixin to provide operators given acompareTomethod. 
3.7.0 #
- Add 
closeToextension to all numbers. - Make 
Fractionsupport non-finite numbers. 
3.6.0 #
- Dart 2.17 requirement.
 - Add a max-heap collection type.
 - Add predicates for the ordering type.
 - Add interval data structure with open, closed, and infinite endpoints.
 
3.5.0 #
- Dart 2.16 requirement.
 - Avoid dynamic calls.
 - Better print strings across the library.
 
3.4.0 #
- Remove deprecated 
hashAllandhash1,hash2,hash3, ... methods. - Add 
ObjectPrinter.addValuefor more dynamic object printing. - Add 
ToStringPrintermixin for simpler use ofObjectPrinter. - Add 
Stream.windowalong the existingIterable.windowextension (thanks to https://github.com/pihentagy). - Various cleanups and better test coverage.
 
3.3.0 #
- Dart 2.14 requirement.
 - Added 
indent/dedentandwrap/unwraptoString. - Deprecated 
hashAllandhash1,hash2,hash3, ... methods, since this is now supported through the core library onObject. 
3.2.0 #
- Make 
Printersignificantly faster by reusing a singleStringBufferinstance where possible. - Make 
Printerstrongly typed, which unfortunately comes with some required API changes:- Number printers do no longer support 
BigInt. - Number printers are directly instantiated, instead of using a factory on Printer.
 
 - Number printers do no longer support 
 - Improved the 
Printerlibrary in various ways:- Renamed 
undefinedto the more intention revealingifNull. - Added 
ifEmptyto print something specific for emptyIterables. - Added 
mapandcastprinters for more flexible printing. - Add initial version of the 
ObjectPrinter. 
 - Renamed 
 
3.1.0 #
- Dart 2.13 requirement.
 - Add 
OptionalandEithertype. - Add 
TypeMapthat maps Dart types to an instance. - Add various kinds of function types and function factories: callback function types, constant functions, empty functions, identity functions, mapping function types, predicate function types, and throwing functions.
 - Add 
String.convertFirstCharacters()andString.convertLastCharacters(). - Add 
String.toUpperCaseFirstCharacter()andString.toLowerCaseFirstCharacter(). 
3.0.0 #
- Dart 2.12 requirement and null-safety.
 - Use 
package:clockandpackage:fake_asyncacross the board. - Add 
BigIntRangeand optimize iteration ofIntegerRange. - Optimize the implementation of 
ExpiryCache. - Fix 
maxAgeof theStream.bufferoperator. - Add 
Fraction.signandComplex.sign. - Add 
IterablePrinterto print lists. - Relax the type constraints on 
Ordering.natural. CharMatcheris now aPattern.- Introduce 
package:more/feature.dartto provide information about the runtime environment. - Add 
Trie(prefix tree) collection type. - Add 
Ordering.percentile. - Add 
Iterable.toMap,Iterable.atRandom,Iterable.min,Iterable.maxandIterable.percentile. - Optimize 
Rangeobject creation and error reporting, and addIterable.indices. - Add converters 
toBiMap,toListMultimap, andtoSetMultimap. - Add 
String.removePrefixandString.removeSuffix. - Add 
List.rotateandQueue.rotate. 
2.8.0 #
- Dart 2.9 compatibility and requirement (in preparation of null-safety).
 - Remove 
Iterable.concat()in favor ofIterable.flatten(). - Split 
Iterable.zip()intoInterable.zip(),Iterable.zipPartial()andIterable.zipPartialWith(). - Fix a bug in 
Ordering.nullsFirstandOrdering.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 
Tupleclasses. 
2.7.0 #
- Add 
separatedBy,flatMapandflattenfunction onIterable. - Cleanup 
printerpackage and improve documentation. 
2.6.0 #
- Add 
repeatfunction onIterable. - 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 
CharMatcherwith lookup tables. - Improved documentation.
 
2.3.0 #
- Add 
ListMultimapandSetMultimap. - Mark 
CharMatcher,CacheandOrderingas immutable. - Improve documentation, which still included pre Dart 2.0 examples.
 - Add extension methods to convert 
ComparatortoOrdering. 
2.2.0 #
- Made 
truncateToPeriodandperiodicalextension methods ofDateTime. - Add extension methods to convert
- a 
Map<K, V>to aBiMap<K, V>, - an 
Iterable<bool>to aBitList, and - an 
Iterable<T>to aMultiset<T>. 
 - a 
 
2.1.0 #
- Cleanup 
Tupleclass 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 
foldandfib, as they are not generally useful. - Moved 
digitstopackage:more/math. 
 - Collections
- Add extension method to 
intanddoubleto create ranges, i.e.0.to(20). - Move the string lists to 
String.toList()extension method. 
 - Add extension method to 
 - Math
- Move all numerical operators to 
num,ìntand/orBigInt(new). 
 - Move all numerical operators to 
 
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_mathpackage, and moved all not-deprecated code topackage: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.stoptoRange.endto be consistent with Dart naming conventions. - Rename 
partitiontochunkedto be more consistent with Dart nomenclature. - Add the 
zipiterable. 
1.12.0 #
- Add the number package.
- Move 
Fractionclass into this package. - Add support for 
Complexnumbers. 
 - Move 
 - Add the 
groupByiterable. 
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 eitherIntegerRange()orDoubleRange(). - Removed padding argument from 
partition(). To migrate replace broken calls-sites withpartitionWithPadding(). 
 - Replace callers of 
 
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.