Skip to content

feat: make ProcessOutput iterable#1101

Merged
antongolub merged 2 commits intogoogle:mainfrom
antongolub:iterable-process-output
Feb 17, 2025
Merged

feat: make ProcessOutput iterable#1101
antongolub merged 2 commits intogoogle:mainfrom
antongolub:iterable-process-output

Conversation

@antongolub
Copy link
Collaborator

@antongolub antongolub commented Feb 17, 2025

closes #1053
closes #1027

supersedes #1088
relates #984

const o = new ProcessOutput({
  store: {
    stdall: ['foo\nba', 'r\nbaz'],
  },
})
const lines = []
const expected = ['foo', 'bar', 'baz']
for (const line of o) {
  lines.push(line)
}
assert.deepEqual(lines, expected)
assert.deepEqual(o.lines(), expected)
  • Tests pass
  • Appropriate changes to README are included in PR

@antongolub antongolub requested a review from antonmedv February 17, 2025 19:50
@antongolub antongolub merged commit 1fc9d0b into google:main Feb 17, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: use iterator for lines getter feat: make resolved ProcessPromise iterable

1 participant