nodejs implementation of stop loss kata