github google/zx 8.5.5
8.5.5 — PVC Wizard

latest releases: 8.8.1, 8.8.0, 8.7.2...
3 months ago

Minor feature polish.

  • ProcessPromise and ProcessOutput lines() getters now accept a custom delimiter #1220 #1218
const cwd = tempdir()
const delimiter = '\0'

const p1 = $({
  cwd
})`touch foo bar baz; find ./ -type f -print0 -maxdepth 1`
(await p1.lines(delimiter)).sort() // ['./bar', './baz', './foo']
  
// or via options
const lines = []
const p2 = $({
  delimiter,
  cwd,
})`find ./ -type f -print0 -maxdepth 1`

for await (const line of p2) {
  lines.push(line)
}

lines.sort() // ['./bar', './baz', './foo']

Don't miss a new zx release

NewReleases is sending notifications on new releases.