Easy String Manipulation with Voca JS
You can install the Voca library in your local modules directory using npm by running “npm install voca” and then require it in your file by setting it equal to a variable like this.
Once the package is installed, you have access to a bunch of helpful methods. Here are 3 methods that I noticed while looking through the documentation that seem useful.
However with Voca all we need to do is this:
Another useful method in the Voca library lets you count the number of times a substring appears in a string object. So if we take a look at this quote from Deion Sanders, we can see how many times he said the word ‘good’
The method also gives you the option to remove all of the tags, or only strip certain tags and keep others.
These are just a few of the methods provided by Voca JS, but I encourage you to go and check out the documentation to see some of the other easy string manipulation methods that it provides!