1.0.1 • Published 9 years ago

normalize-license-data v1.0.1

Weekly downloads
10
License
MIT
Repository
github
Last release
9 years ago

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

Dev Dependencies

License

MIT

Generated by package-json-to-readme