cull-keywords

1.0.2 • Public • Published

cull-keywords

returns an object of keywords / keyphrases from a string.

CircleCI Codecov

Table of Contents

Install

npm:

 
npm i [ -S ] cull-keywords
 

Usage

 
const cullKeywords = require('cull-keywords')
const string = /* ... */
 
/* Using callbacks */
cullKeywords(string, (err, results) => {
  if (err) {
    ...
  }
 
  ...
}
 
/* Using promises */
cullKeywords(string, 'format')
  .then(results => ... )
  .catch(err => ... )
 

The format option removes apostrophes and replaces spaces with hyphens.

API

cullKeywords(string[, options[, callback]])

Parameters
  • string (String) - String to work on
  • options (Object | String, optional) - Options object or options name as a string.
  • callback (Function, optional) - Callback function

If no callback is passed then a Promise is returned.

Returns

Object containing two keys, keywords and keyphrases.

{ keywords: [ ... ], keyphrases: [ ... ] }

standard-readme compliant David

Contribute

PRs accepted and appreciated

Dependencies

License

MIT © Paul Zimmer

Package Sidebar

Install

npm i cull-keywords

Weekly Downloads

9

Version

1.0.2

License

MIT

Last publish

Collaborators

  • mrzmmr