Skip to content

Instantly share code, notes, and snippets.

@mattpodwysocki
Created October 5, 2017 02:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mattpodwysocki/361eda999e50a9d6928462ef7e2d5ec6 to your computer and use it in GitHub Desktop.
Save mattpodwysocki/361eda999e50a9d6928462ef7e2d5ec6 to your computer and use it in GitHub Desktop.
'use strict';
import * as fs from 'fs';
import { AsyncSink, AsyncIterable } from 'ix';
AsyncIterable.from(fs
.createReadStream('some.file')
.pipe(new AsyncSink()))
.flatMap(file => /* yes */)
.forEach(/* HEAVEN */)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment