Get the extra words that decorate a base phrase
The stuff words are the words that appear on a phrase decorating a "base". For example, consider the following pangram:
The quick brown fox jumps over the lazy dog
If our base is
brown fox, then the stuff words are:
This module is inspired by the concept of stuff words from Scientific Seller Amazon Keyword Tool.
stuffwords by running:
$ npm install --save stuffwords
Object stuffwords.get(String base, String phrases)
This function retrieves the stuff words from a set of phrases given a base, and returns an array of objects that contain the following properties:
String .term: The stuff word term
Number .counter: How many times the stuff word appears in the phrase set
var stuffwords = ;var words = stuffwords;console;
term: 'for'counter: 2term: 'mac'counter: 1term: 'acer'counter: 1
Boolean stuffwords.matches(String base, String phrase, String term)
This function determines if the passed term is a stuff word of a phrase.
var stuffwords = ;if stuffwordsconsole;
If you're having any problem, please raise an issue on GitHub and I'll be happy to help.
Run the test suite by doing:
$ npm test
Before submitting a PR, please make sure that you include tests, and that jshint runs without any warning:
$ npm run-script lint
The project is licensed under the MIT license.