Skip to content

Commit

Permalink
v1.1.0 (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
SandroMaglione authored Aug 13, 2023
2 parents 354707c + 454e0d4 commit 6757450
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
25 changes: 20 additions & 5 deletions packages/fpdart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
## v1.1.0-dev
## v1.1.0 - 13 August 2023

- Added `lookupEq` and `dropRight` on `Iterable`.
- Added `lookupKeyEq` on `Map`.
- Some optimization.
- Improved performance of some iterable based functions in `Iterable` and `Map` extension (thanks to [lrhn](https://github.com/lrhn) 🎉)

## v1.0.0-beta.1 - 27 May 2023
- Added `lookupEq` and `dropRight` on `Iterable` extension
```dart
[].lookupEq(Eq.eqInt, 5) // None()
[1, 2, 3, 4].lookupEq(Eq.eqInt, 5) // None()
[1, 2, 3, 4].lookupEq(Eq.eqInt, 3) // Some(3)
[1, 6, 4, 3, 2].lookupEq(Eq.by((n) => n % 3, Eq.eqInt), 0) // Some(6)
[1, 2].dropRight(3) // []
[1, 2, 3, 4].dropRight(1) // [1, 2, 3]
```

- Added `lookupKeyEq` on `Map` extension
```dart
<String, int>{'a': 1, 'b': 2, 'c': 3, 'd': 4}.lookupKeyEq(Eq.eqString, 'b'); // Some('b')
<String, int>{'a': 1, 'b': 2, 'c': 3, 'd': 4}.lookupKeyEq(Eq.eqString, 'e'); // None()
```

## v1.0.0 - 27 May 2023
- Minimum environment dart sdk to `3.0.0` ⚠️ (Dart 3️⃣)
```yaml
environment:
Expand Down
3 changes: 2 additions & 1 deletion packages/fpdart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Interested in what `fpdart` is and how it came to be?
```yaml
# pubspec.yaml
dependencies:
fpdart: ^1.0.0 # Check out the latest version
fpdart: ^1.1.0
```
## ✨ Examples
Expand Down Expand Up @@ -483,6 +483,7 @@ In general, **any contribution or feedback is welcome** (and encouraged!).

## 📃 Versioning

- v1.1.0 - 13 August 2023
- **v1.0.0** - 26 July 2023

***
Expand Down
2 changes: 1 addition & 1 deletion packages/fpdart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: fpdart
description: >
Functional programming in Dart and Flutter.
All the main functional programming types and patterns fully documented, tested, and with examples.
version: 1.0.0
version: 1.1.0
homepage: https://www.sandromaglione.com/
repository: https://github.com/SandroMaglione/fpdart
author: Maglione Sandro <lass.maglio@gmail.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ void main() {

test('found first', () {
var findMod3 =
[1, 6, 4, 3, 2].lookupEq(Eq.by((int n) => n % 3, Eq.eqInt), 0);
[1, 6, 4, 3, 2].lookupEq(Eq.by((n) => n % 3, Eq.eqInt), 0);
expect(findMod3, isA<Some>());
expect(findMod3.getOrElse(() => throw "not"), 6);
});
Expand Down

0 comments on commit 6757450

Please sign in to comment.