An implementation of "Sudden-Death" Generator in JS