Skip to content

Commit

Permalink
Merge pull request #102 from leisim/release/0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy authored Jul 21, 2020
2 parents 7464f18 + 1e0b331 commit b488b17
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 83 deletions.
29 changes: 26 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
## 0.4.2+1

- Support the `package:collection` `^1.14.11`.
## 0.5.0

- [PR-94](https://github.com/leisim/dartx/pull/94) Breaking: `Iterable<T>.zip(other, transform)` now support zipping iterables of other types the `T`. This is a breaking change because it is now required to add types in the transform function.
```dart
final amounts = [2, 3, 4];
final animals = ['dogs', 'birds', 'cats'];
final all = amounts.zip(animals, (int amount, String animal) => '$amount $animal');
// lambda types are now required: ⇧ ⇧
// all: ['2 dogs', '3 birds', '4 cats']
```
- [PR-90](https://github.com/leisim/dartx/pull/90) New `String` extensions
- `String removePrefix(String prefix)`
- `String removeSuffix(String suffix)`
- `String removeSurrounding({String prefix, String suffix})`
```dart
final name = 'James Bond'.removePrefix('James '); // Bond
final milliseconds = '100ms'.removeSuffix('ms'); // 100
final text = '<p>Some HTML</p>'.removeSurrounding(prefix: '<p>', suffix: '</p>'); // Some HTML
```
- [PR-88](https://github.com/leisim/dartx/pull/88) New `List` extension `void swap(int, int)` which swaps the elements in the indices provided.
```dart
final list = [1, 2, 3, 4];
list.swap(0, 2); // [3, 2, 1, 4]
```
- [PR-100](https://github.com/leisim/dartx/pull/100) Relax the upper version constraint of `collection` to support Flutter 1.20 (which uses `collection: 1.3.0-nullsafety`)
- [PR-101](https://github.com/leisim/dartx/pull/101) Relax the upper version constraint of `crypto`

## 0.4.2

Expand Down
1 change: 1 addition & 0 deletions lib/dartx.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'dart:typed_data';
import 'package:characters/characters.dart';
import 'package:collection/collection.dart' hide DelegatingList;
import 'package:crypto/crypto.dart' as crypto;
import 'package:meta/meta.dart';

export 'package:time/time.dart';
export 'package:characters/characters.dart';
Expand Down
Loading

0 comments on commit b488b17

Please sign in to comment.