Socket
Socket
Sign inDemoInstall

produce-package-keywords

Package Overview
Dependencies
66
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    produce-package-keywords

Produces keywords for your node.js package so that users can better find your package on npm


Version published
Weekly downloads
7
increased by75%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

produce-package-keywords

CircleCI Codecov npm

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)

// alias

ppk(string, callback)
ppk(string, (error, result) => {
  if (error) {
    ...
  }

  ...
})

or from package.json's name and description fields

ppk.process(callback)

// alias

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

standard-readme compliant David David

Contribute

PRs accepted and greatly appreciated.

Dependencies

Dev Dependencies

License

MIT © mrzmmr

Keywords

FAQs

Last updated on 03 Feb 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc