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 = require('produce-package-keywords')
produce keywords given a file
ppk.fromFile('path/to/file.txt', (error, result) => {
if (error) {
...
}
...
})
produce keywords given a string
ppk.process(string, callback)
ppk(string, callback)
ppk(string, (error, result) => {
if (error) {
...
}
...
})
or from package.json's name and description fields
ppk.process(callback)
ppk(callback)
ppk((error, result) => {
if (error) {
...
}
...
})
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 install
npm test
Contribute
PRs accepted and greatly appreciated.
Dependencies
Dev Dependencies
License
MIT © mrzmmr