An example use case of this module is to sanitize HTML emails before displaying them in a browser to prevent cross-site scripting attacks. This module can also be used from the command line. Install it globally using the following command:. For command line usage, install it globally. It reads the input HTML from its stdin and outputs the result to stdout.
In order to remove all non-numeric characters from a string, replace function is used. Parameters: This function accepts two parameters as mentioned above and described below:. This example preserves the float numbers. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Include Strip below the latest 3. Alternatively Strip can be installed using Bower or npm :. Or customize Strip by putting options on the data-strip-options attribute:.