cull-keywords
returns an object of keywords / keyphrases from a string.
Table of Contents
Install
npm:
npm i [ -S ] cull-keywords
Usage
const cullKeywords = require('cull-keywords')
const string =
cullKeywords(string, (err, results) => {
if (err) {
...
}
...
}
cullKeywords(string, 'format')
.then(results => ... )
.catch(err => ... )
The format option removes apostrophes and replaces spaces with hyphens.
API
cullKeywords(string[, options[, callback]])
Parameters
If no callback is passed then a Promise is returned.
Returns
Object containing two keys, keywords and keyphrases.
{ keywords: [ ... ], keyphrases: [ ... ] }
Contribute
PRs accepted and appreciated
Dependencies
License
MIT © Paul Zimmer