Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created December 8, 2012 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raynos/4237703 to your computer and use it in GitHub Desktop.
Save Raynos/4237703 to your computer and use it in GitHub Desktop.
chain(stream)
.filter(function isValid() { ... })
.map(function (data) {
var foos = getFoos(data)
if (!foos) return null
var bars = getBars(data)
return { foos: foos, bars: bars }
})
.filter(Boolean)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment