A sporadically choking stream; burp this baby!
Latest commit 8ec9a3b Jun 21, 2013 @naomik Bump to version 0.1.5


Hiccup build status

Create streams that simulate slow, sloth-like behavior


var stream = require("stream"),
    hiccup = require("hiccup");

// create slow stream; emits ~3 bytes every ~200 ms
var weezing = new hiccup.Throttle({bytes: 3, latency: 200});

// create a choking stream; lags for 1 s every 2 s
var koffing = new hiccup.Choke({delay: 1000, interval: 2000});

// connect streams

// the weezing daydreams about meat!
weezing.write("Spare ribs ribeye pancetta meatball ham hock tongue fatback \
drumstick tenderloin. Cow ribeye turducken, pancetta short loin shoulder \
pork belly venison biltong. Capicola ball tip venison kielbasa cow \
hamburger shankle biltong beef shank frankfurter pastrami pork chicken.\n\n");

weezing.write("Meatball turducken ribeye pastrami, chuck turkey sirloin. \
Venison capicola rump pork loin. Flank frankfurter bacon capicola.\n\n");