batchCheck function
Implementation
Stream<CheckedDomain> batchCheck(Iterable<String> input) async* {
final checks = <Future>[];
for (final domain in input) {
for (final variant in expand(domain)) {
final parts = variant.split('.');
assert(parts.length == 2);
final name = parts.first;
final tld = parts.last;
checks.add(
check(name, tlds: tld == '*' ? asteriskTLDs : [tld]),
);
}
}
await for (final checked in Stream.fromFutures(checks)) {
yield* Stream.fromIterable(checked);
}
}