Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

replaceall-shim

mim-Armand27ISC1.0.1

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!

ecma-262, replaceAll, shim

readme

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'