Skip to content

Commit

Permalink
💡 add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed Apr 2, 2024
1 parent 571fcf0 commit ea55ac6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/src/enums/duplicates.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// An enum of all available duplicate handling strategies.
enum Duplicates {
combine,
first,
Expand Down
1 change: 1 addition & 0 deletions lib/src/enums/format.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
typedef Formatter = String Function(String value);

/// An enum of all supported URI component encoding formats.
enum Format {
rfc1738(_rfc1738Formatter),

Expand Down
1 change: 1 addition & 0 deletions lib/src/enums/list_format.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
typedef ListFormatGenerator = String Function(String prefix, [String? key]);

/// An enum of all available list format options.
enum ListFormat {
brackets(_brackets),
comma(_comma),
Expand Down
1 change: 1 addition & 0 deletions lib/src/enums/sentinel.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// An enum of all available sentinels.
enum Sentinel {
/// This is what browsers will submit when the ✓ character occurs in an
/// application/x-www-form-urlencoded body and the encoding of the page containing
Expand Down
2 changes: 2 additions & 0 deletions lib/src/extensions/extensions.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import 'package:qs_dart/src/models/undefined.dart';

extension IterableExtension<T> on Iterable<T> {
/// Returns a new [Iterable] without [Undefined] elements.
Iterable<T> whereNotUndefined() => where((T el) => el is! Undefined);
}

extension ListExtension<T> on List<T> {
/// Returns a new [List] without [Undefined] elements.
List<T> whereNotUndefined() => where((T el) => el is! Undefined).toList();
}

0 comments on commit ea55ac6

Please sign in to comment.