-
-
Save Raynos/3c5b26e1921fe4ae44e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dnode = require('dnode'); | |
var net = require('net'); | |
var server = net.createServer(function (c) { | |
var d = dnode({ | |
transform : function (s, cb) { | |
cb(s.replace(/[aeiou]{2,}/, 'oo').toUpperCase()) | |
} | |
}); | |
c.pipe(d).pipe(c); | |
}); | |
server.listen(5004); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment