there is no gsub in javascript

Re #23