nodejs code for generating availability-phrases