diff --git a/readme.markdown b/readme.markdown index d56afa8..4ce5177 100644 --- a/readme.markdown +++ b/readme.markdown @@ -99,10 +99,30 @@ Same as `map`, but the callback is called synchronously. Based on `es.through` Map elements nested. +``` js +var es = require('event-stream') + +es.flatmapSync(function (data) { + //transform data + // ... + return data +}) + +``` + ## filterSync (syncFunction) Filter elements. +``` js +var es = require('event-stream') + +es.filterSync(function (data) { + return data > 0 +}) + +``` + ## split (matcher) Break up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp`