Skip to content

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!

License

Notifications You must be signed in to change notification settings

mim-Armand/replaceAll-Shim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'

About

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!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published