exclusive range generator for javascript