1.0.2 • Published 7 years ago

cull-keywords v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

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