heart library

Extension methods, with extra functions below

Extensions

HeartInt on int
Extension methods for integers
HeartIterable on Iterable
Compare dynamic iterables with deepEquals
HeartIterableDouble on Iterable<double>
Extension methods for collection of doubles
HeartIterableE on Iterable<E>
Extension methods that maintain types.
HeartIterableInt on Iterable<int>
Extension methods for collection of integers
HeartIterableIterable on Iterable<Iterable<E>>
Extension methods that maintain types for nested iterables.
HeartIterableNum on Iterable<num>
Extension methods for collection of nums. These methods will be used when a list has both ints and doubles.
HeartIterableString on Iterable<String>
Extension methods for collection of Strings
HeartString on String
Extension methods for Strings

Functions

deepEquals(dynamic a, dynamic b) bool
Checks for equality of multiple data types, including nested iterables.
inclusive(int a, [int? b, int? step]) List<int>
Generates an inclusive List of integers. inclusive(3) returns 0, 1, 2, 3 inclusive(-3) returns -3, -2, -1, 0
inclusiveString(String a, [String? b, int? step]) String
Uses character codes and inclusive. Strings must have exactly 1 character.
nums(int a, [int? b, int? step]) List<int>
Generates a List of integers
range(int a, [int? b, int? step]) List<int>
Generates a List of integers. range(n) is always in ascending order, doesn't include n itself. range(3) returns 0, 1, 2 range(-3) returns -2, -1, 0 range(0) returns []
rangeString(String a, [String? b, int? step]) String
Uses character codes and range. Strings must have exactly 1 character.
zip<T>(Iterable<Iterable<T>> it) List<List<T>>
Takes in iterables, returns a list of lists where corresponding elements are paired together.
zip2<T>(Iterable<Iterable<T>> it, dynamic zipFunction(T a, T b)) List
Takes in an iterable of 2 iterables and performs a function between corresponding elements.
zip3<T>(Iterable<Iterable<T>> it, dynamic zipFunction(T a, T b, T c)) List
Takes in an iterable with 3 iterables and performs a function between corresponding elements.
zip4<T>(Iterable<Iterable<T>> it, dynamic zipFunction(T a, T b, T c, T d)) List
Takes in an iterable with 4 iterables and performs a function between corresponding elements.