a module for node.js, you can use your function as a stream source