produce-package-keywords
Produces keywords for a package by analyzing its package.json, a string, or file.
Table of Contents
Install
npm install produce-package-keywords --save
Usage
const ppk =
produce keywords given a file
ppk
produce keywords given a string
ppk // alias
or from package.json's name and description fields
ppk // alias
Api
producePackageKeywords([string], callback)
Returns an error first callback with an array of extracted keywords from string if given, otherwise from package.json's name and description fields.
options
[string] - optional string argument
callback - error first callback
producePackageKeywords.fromFile(file, callback)
Returns an error first callback with an array of extracted keywords from the given file
options
file - file to extract from
callback - error first callback
Tests
npm installnpm test
Contribute
PRs accepted and greatly appreciated.
Dependencies
- nlcst-to-string: Stringify NLCST
- read-pkg-up: Read the closest package.json file
- retext: Natural language processor powered by plugins
- retext-keywords: Keyword extraction with Retext
Dev Dependencies
- babel-cli: Babel command line.
- babel-preset-latest: Babel preset including es2015+
- codecov: Uploading report to Codecov: https://codecov.io
- nyc: the Istanbul command line interface
- rimraf: A deep deletion module for node (like
rm -rf
) - tap-spec: Formatted TAP output like Mocha's spec reporter
- tape: tap-producing test harness for node and browsers
License
MIT © mrzmmr