dominictarr/map-stream — pull request #10 by josh (2014-02-21 06:44:00+00:00)
Title: Accept Promises returned from mapper function

Curious what you think of this idea.

``` javascript
function getJSON(url) {
return new Promise(function(resolve) {
http.get(url, function(res) {
// ...
res.on('end', function() {
resolve(JSON.parse(body));
});
})
})
}

var map = require('map-stream');
process.stdin
.pipe(map(getJSON))
.pipe(process.stdout);
```

Similar to `mapSync`.