We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d2b8eeb + c289e8d commit 38f9ff3Copy full SHA for 38f9ff3
packages/powersync/lib/src/stream_utils.dart
@@ -68,6 +68,13 @@ Stream<Object?> ndjson(ByteStream input) {
68
return jsonInput;
69
}
70
71
+/// Given a raw ByteStream, parse each line as JSON.
72
+Stream<String> newlines(ByteStream input) {
73
+ final textInput = input.transform(convert.utf8.decoder);
74
+ final lineInput = textInput.transform(const convert.LineSplitter());
75
+ return lineInput;
76
+}
77
+
78
void pauseAll(List<StreamSubscription> subscriptions) {
79
for (var sub in subscriptions) {
80
sub.pause();
0 commit comments