replaceall-shim

1.0.1 • Public • Published

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'

/replaceall-shim/

    Package Sidebar

    Install

    npm i replaceall-shim

    Weekly Downloads

    0

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    4.44 kB

    Total Files

    9

    Last publish

    Collaborators

    • mim