Closed muriloime closed 3 years ago
Hi! With older versions of node (< 15.0.0
), this will trigger a TypeError: replaceAll is not a function
(source).
I would suggest this fix instead, to preserve compatibility:
- .replace(/\//, '--');
+ .replace(/\//g, '--');
What do you think? Do you want me to I open a PR for this?
@Spone Thanks for pointing to this 👍
Do you want me to I open a PR for this?
Yes, please)
Hi @palkan
Js replace method replaces only the first occurrence. In order to reflect the definition in ruby code we need to use replaceAll.
Cheers