1.0.1 • Published 3 years ago

replaceall-shim v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

replaceAll-Shim

This will add the replaceAll method to the string prototype, so you can use it exactly as you would with ECMA-262 and all need to be done after support was added to your env is to remove the require at the top!

Usage:

All you have to do is to require the package on the top of your file after you installed the package (npm i replaceAll-Shim),

require('replaceAll-Shim');

then you can use replaceAll method as you would if ECMA-262 was supported in your environment as the method will be added to the String prototype:

'aabbcc'.replaceAll('b', '.');
// 'aa..cc'