Index: pkg/barback/lib/src/utils.dart |
diff --git a/pkg/barback/lib/src/utils.dart b/pkg/barback/lib/src/utils.dart |
index bee60841dfdfed85a67ae21a7a3500d81e85f63a..3272e9e0e3af008ef946a12c364fbf0dc587fdb7 100644 |
--- a/pkg/barback/lib/src/utils.dart |
+++ b/pkg/barback/lib/src/utils.dart |
@@ -72,6 +72,10 @@ Set unionAll(Iterable<Set> sets) => |
Map mapMapValues(Map map, fn(key, value)) => |
new Map.fromIterable(map.keys, value: (key) => fn(key, map[key])); |
+/// Returns whether [set1] has exactly the same elements as [set2]. |
+bool setEquals(Set set1, Set set2) => |
+ set1.length == set2.length && set1.containsAll(set2); |
+ |
/// Merges [streams] into a single stream that emits events from all sources. |
Stream mergeStreams(Iterable<Stream> streams) { |
streams = streams.toList(); |