Bob Martin's bowling game kata done once in NodeJS