unique.Time() in Node red

unique.Time() did not work in a function node so I tried

let time = new Date().getTime().toLocaleString();
time = time.replaceAll(",","");

to do something similar but replaceAll is also complained.
what would be the right way to get what unique.Time() does usually in javascript ?
why is not everything as in usually in javascript ?

I can't find any reference to unique.Time, can you provide any docs to what it does?

Also, String.replaceAll was only adding in Node 15. Before that you can use String.replace with the global flag:

time = time.replace(/,/g,"")

But, as Colin says, not sure what unique.Time() is referring to - can't find any mention of that in any language.

Thanks for that . The global flag solution did work.

probably unique comes from the jquery libray from the page I want to migrate to dashboard