node js replaceall is not a function