sugar 4.0.0
sugar: ^4.0.0 copied to clipboard
Forus Labs' standard library extension. Utilities for date-times, timezones, collections, monads & more.
4.0.0 (Next) #
Sugar 4 plans to deduplicate efforts with other more well-established "extended std library" packages such as
dart:collection. This means the removal of duplicated APIs such as reverse<E>(...).
sugar.collection #
- Add
Lists.toggleAll(...) - Add
SplayTreeMaps.firstValueAfter(...) - Add
SplayTreeMaps.lastValueBefore(...) - Remove
reverse(...). - Remove
IterableIterable. - Remove
Lists.swap(...).
sugar.core #
- Add
System.currentDateTime - Add
System.epochMilliseconds - Add
System.epochMicroseconds - Breaking - Change
RuntimetoSystem - Breaking - Remove
Maybeextension. - Remove
Iterables.indexed
sugar.crdt #
- Add
StringIndex - Add
Sil
sugar.math #
- Add
NullableNumbers - Add
NullableIntegers - Add
NullableDoubles - Breaking Change
double.approximately(...)todouble.around(...)
sugar.time #
- Add optional
DateUnitparameter toLocalDate.now(...) - Add optional
TemporalUnitparameter toLocalDateTime.now(...) - Add optional
TimeUnitparameter toLocalTime.now(...) - Add optional
TimeUnitparameter toOffsetTime.now(...) - Change
LocalDate.now(...)to be stubbable - Change
LocalDateTime.now(...)to be stubbable - Change
LocalTime.now(...)to be stubbable - Change
OffsetTime.now(...)to be stubbable - Breaking Change
OffsettoTimezoneOffsetto avoid naming conflict with Flutter'sOffset - Change IANA database from
2023cto2025a - Fix timezone detection on recent versions of macOS
- Fix
Etc/*timezones not returning correct string representation
3.1.0 (19/06/2023) #
sugar.collection #
- Add
Sets.toggle(...) - Change
Iterables.indexed()toIterables.indexedto be consistent withList.indexed
sugar.core #
- Add
NotTested.thirdPartIntegration() - Change
Disposablefrom a mixin to an abstract interface class - Fix
Strings.toCamelCase()throwing aStateErroron empty strings
sugar.math #
- Add
Random.nextWeightedBool(...)
sugar.time.interop #
- Add
Dates.leapYearMonths - Add
Dates.nonLeapYearMonths - ADd
DateTimes.fromDaysSinceEpoch(...) - Add
DateTimes.toLocalDate() - Add
DateTimes.toLocalDateTime() - Add
DateTimes.toLocalTime() - Add
DateTimes.toOffsetTime() - Add
DateTimes.toZonedDateTime()
3.0.0+1 (15/05/2023) #
Update README.md
3.0.0 (14/05/2023) #
This release is a complete rework of the library, capitalizing on the real-life experiences gained over the past 2 years.
- Date-time and timezone API inspired by
java.time. - Monads such as
Result<S,F>&Maybe<T>. - Syntax sugar for aggregating & manipulating collections.
- Types for representing and working with ranges & intervals.
2.4.1 (02/12/2022) #
This release fixes Equality.equals(...) accepting a dynamic instead of Object.
2.4.0 (09/12/2021) #
This release bumps the minimum supported Dart version to 2.15
2.3.3 (08/12/2021) #
This release adds an accidentally omitted method.
- Add
Weekdays.unparse(Iterable<bool>)
2.3.2 (07/12/2021) #
This release adds a few additional convince methods.
- Add
Integers.from(bool) - Add
Integers.toBool() - Add
Weekdays.parse(int)
2.3.1 (19/11/2021) #
This release focuses on improving documentation and preparing for Dart 2.15.
- Add
disposable.dart - Change
crypto.darttocryptography.dart
2.3.0 (10/09/2021) #
This release adds new higher-order functions for composing functions. In addition, the library now minimally requires Dart 2.14.
- Add
Calltype definition - Add
Callsextension that contain higher-order functions for composingCalls - Add
Consumertype definition - Add
Consumersextension that contain higher-order functions for composingConsumers - Add
Mappertype definition - Add
Mappersextension that contain higher-order functions for composingMappers - Add
Predicatetype definition - Add
Predicatesextension that contain higher-order functions for composingPredicates - Add
Suppliertype definition - Add
Suppliersextension that contain higher-order functions for composingSuppliers - Change
Lists.repeat(int)extension toLists.operator *(int). - Remove
hash(Iterable<dynamic>)- function has been superseded byObject.hash(...)indart:core.
2.2.0 (21/07/2021) #
- Add
Debounce
2.1.1 (17/07/2021) #
- Add
List<T>.repeat(T) - Change
List<T>.separate(T)toList<T>.alternate(T)
2.1.0 (30/06/2021) #
This release adds new annotations & cryptological functions.
- Add
@PlatformDependent - Add
@Subset - Add
@Throws - Add
@annotation - Add
@throws - Add
HashExtensions - Add
nonce(...) - Change
Result.presenttoResult.successful - Change
Result.notPresenttoResult.failure - Change
Result.ifPresent(...)tpResult.ifSuccessful(...) - Change
Result.ifNotPresent(...)tpResult.ifFailure(...)
2.0.1 (29/06/2021) #
Downgrade meta from 1.4.0 to .1.3.0 to enable compatibility with Flutter
2.0.0 We have awoken! (25/06/2021) #
This release focuses on supporting null safety.
1.0.0 Initial Launch! 🚀 (06/10/2020) #
- Add collection library
- Add core library
- Add time library