npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

normalize-license-data

1.0.1

@zeke

npmHomeRepoSnykSocket
Downloads:2
$ npm install normalize-license-data
DailyWeeklyMonthlyYearly

normalize-license-data

clean up licenses from package.json files and the npm registry

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install normalize-license-data --save

Usage

var normalize = require("normalize-license-data")

normalize(null)
// => null

normalize('')
// => null

normalize('MIT')
// => {name: 'MIT', url: 'http://opensource.org/licenses/MIT'}

normalize('BSD')
// => {name: 'BSD', url: 'http://opensource.org/licenses/BSD-2-Clause'}

normalize('unfamiliar')
// => {name: 'unfamiliar'}

normalize({name: 'wtfpl', url: 'https:///wtfpl.net'})
// => {name: 'wtfpl', url: 'https:///wtfpl.net'}

normalize({type: 'wtfpl', url: 'https:///wtfpl.net'})
// => {name: 'wtfpl', url: 'https:///wtfpl.net'}

normalize('https://custom-license.com')
// => {name: 'custom-license.com', url: 'https:///custom-license.com'}

Tests

npm install
npm test

Dependencies

  • is_js: micro check library
  • lodash.clone: The modern build of lodash’s _.clone as a module.
  • oss-license-name-to-url: Convert shorthand OSS license names to opensource.org URLs
  • schemeless: Remove the parts of URLs that humans don't really need to see

Dev Dependencies

  • code: assertion library
  • mocha: simple, flexible, fun test framework
  • package-json-to-readme: Generate a README.md from package.json contents
  • standard: JavaScript Standard Style

License

MIT

Generated by package-json-to-readme