Implementation of Perl's Algorithm::CouponCode for NodeJS