Skip to content

Commit 4d3102f

Browse files
committed
Bump to 1.0
1 parent 4dca258 commit 4d3102f

File tree

7 files changed

+5
-59
lines changed

7 files changed

+5
-59
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.0
2+
- Promote to stable version
3+
- Remove deprecated extensions
4+
15
## 0.8.0
26

37
- [PR-136](https://github.com/leisim/dartx/pull/136) New: Multiple extensions for `Map`. `all()`, `any()`, `count()`, `filter()`, `filterKeys()`, `filterNot`, `filterValues`, `getOrElse()`, `mapEntries()`, `mapKeys()`, `mapValues()`, `maxBy()`, `maxWith()`, `minBy()`, `minWith`, `none()`, `toList()`, `toMap()`, `orEmpty()`

README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,6 @@ final word = 'abcd'.capitalize(); // Abcd
104104
final anotherWord = 'Abcd'.capitalize(); // Abcd
105105
```
106106

107-
### .chars - DEPRECATED
108-
109-
Use `.characters` from the official characters package.
110-
111-
Get a list of single character strings from a string. Supports emojis.
112-
113-
```dart
114-
final chars = 'family👨‍👨‍👧‍👦'.chars; // ['f', 'a', 'm', 'i', 'l', 'y', '👨‍👨‍👧‍👦']
115-
```
116-
117107
### .decapitalize
118108

119109
Returns a copy of the string having its first letter lowercased, or the original string, if it's empty or already starts with a lower case letter.
@@ -366,18 +356,6 @@ for (final i in 10.rangeTo(2).step(2)) {
366356

367357
## Function
368358

369-
### .invoke() - DEPRECATED
370-
371-
Use `call()` instead. This is very useful for `null` checks.
372-
373-
```dart
374-
final func = (String value) {
375-
print(value);
376-
}
377-
378-
func?.call('hello world');
379-
```
380-
381359
### .partial(), .partial2() ...
382360

383361
Applies some of the required arguments to a function and returns a function which takes the remaining arguments.

lib/src/function.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ typedef Function2<A, B, R> = R Function(A a, B b);
66
typedef Function3<A, B, C, R> = R Function(A a, B b, C c);
77
typedef Function4<A, B, C, D, R> = R Function(A a, B b, C c, D d);
88

9-
extension Function0InvokeExtension<R> on Function0<R> {
10-
/// Invokes this function and returns it's return value.
11-
@Deprecated('Use `call()`')
12-
R invoke() => this();
13-
}
14-
159
extension Function1InvokeExtensions<A, R> on Function1<A, R> {
1610
/// Invokes this function and returns it's return value.
1711
R invoke(A first) => this(first);

lib/src/string.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@ part of dartx;
33
const _ascii = 0x007f;
44
const _latin1 = 0x00ff;
55

6-
extension StringCharsExtension on String {
7-
/// The characters of a string.
8-
///
9-
/// A character is a Unicode Grapheme cluster represented by a substring of
10-
/// the original string.
11-
///
12-
/// Please use [StringCharacters].characters
13-
/// https://github.com/dart-lang/characters/blob/10527437926f1b454edf9912fe700aa2506b1c3d/lib/src/extensions.dart#L9
14-
@Deprecated('Use .characters from the official characters package')
15-
Iterable<String> get chars => characters.Characters(this);
16-
}
17-
186
extension StringCapitalizeExtension on String {
197
/// Returns a copy of this string having its first letter uppercased, or the
208
/// original string, if it's empty or already starts with an upper case

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dartx
22
description: Superpowers for Dart. Collection of useful static extension methods.
3-
version: 0.8.0
3+
version: 1.0.0
44
homepage: https://github.com/leisim/dartx
55

66
environment:

test/function_test.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@ import 'package:test/test.dart';
44

55
void main() {
66
group('Function', () {
7-
group('Function0X', () {
8-
final func = () => 5;
9-
10-
test('.invoke', () {
11-
// ignore: deprecated_member_use_from_same_package
12-
expect(func.invoke(), 5);
13-
});
14-
});
15-
167
group('Function1X', () {
178
final func = (String s) => s;
189

test/string_test.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ import 'package:test/test.dart';
55

66
void main() {
77
group('StringX', () {
8-
test('.chars', () {
9-
// ignore: deprecated_member_use_from_same_package
10-
expect('test12'.chars, ['t', 'e', 's', 't', '1', '2']);
11-
expect('test12'.characters, ['t', 'e', 's', 't', '1', '2']);
12-
// ignore: deprecated_member_use_from_same_package
13-
expect('ഐ⌛酪Б👨‍👨‍👧‍👦'.chars, ['ഐ', '⌛', '酪', 'Б', '👨‍👨‍👧‍👦']);
14-
expect('ഐ⌛酪Б👨‍👨‍👧‍👦'.characters, ['ഐ', '⌛', '酪', 'Б', '👨‍👨‍👧‍👦']);
15-
});
16-
178
test('.capitalize()', () {
189
expect(''.capitalize(), '');
1910
expect('123'.capitalize(), '123');

0 commit comments

Comments
 (0)