Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

license-types

brettz9158MIT3.1.0

A rough classification of licenses such as by aspects of permissiveness

license, licenses

readme

license-types

A rough classification of licenses such as by aspects of permissiveness (a license will set these with a true boolean value when relevant), categories adapted from https://github.com/delfrrr/npm-consider.:

  • publicDomain - Licenses effectively releasing into the public domain
  • permissive - Highly permissive, like MIT
  • weaklyProtective - Some protective aspects, like LGPL or MPL
  • protective - Protective, like GPL
  • networkProtective - Protective, including over network use, like AGPL
  • useProtective - Has restrictions on usage (e.g., non-commercial), like Creative Commons Non-Commercial licenses
  • modifyProtective - Prevents modification, like Creative Commons No-Derivatives licenses

These categories have generally been defined to be mutually exclusive, though useProtective and modifyProtective may be used together or one may be used exclusive to the other.

See a JSON Schema file specifying this format.

A file types.json is also provided to suggest some English text and colors for the types (with greenish tones suggesting more permissive license types and reddish tones suggesting the need for more caution by users/sharers/modifiers of the code due to more stringent requirements, and darker tones indicating unclear or fully restricted uses).

The types.json file also has its own JSON schema. Note that in addition to the types in the license types JSON, this latter file also has entries for "unlicensed" (as "UNLICENSED" is used by npm for copyright being reserved), "custom" (where "SEE LICENSE IN " prefixes an entry in npm license), "uncategorized" (for any licenses we have yet to categorize), and "missing" (for packages which simply don't list any license type; while the copyright should need to be treated as reserved, it is distinct in that the author may have inadvertently failed to specify it).

None of this is legal advice and none of this should be considered as a warranty, as final, or as authoritatively accurate. Pull requests are welcome to add new licenses and their metadata (providing a link).

install

npm i license-types

Usage

import getLicenseTypes from 'license-types';
const licenseTypes = await getLicenseTypes();

Authors and license

Brett Zamir and contributors.

MIT License, see the included LICENSE-MIT.md file.

changelog

CHANGES to license-types

3.1.0

  • feat: Add BlueOak-1.0.0 (as permissive)
  • fix: remove dupe property of Artistic-2.0 (ensuring is permissive)

3.0.1

  • fix: proper main

3.0.0

  • BREAKING refactor: getLicenseTypes as named export
  • feat: export getLicenseTypeInfo
  • chore: drop package-lock.json

2.0.0

  • BREAKING refactor: Switch to JavaScript export by default for better compatibility with Node ESM without full JSON support.
  • BREAKING chore: Requires Node 14
  • chore: adds eslint

1.0.2

  • Fix: Text on "Use protective" and "Modify protective" needed differentiation

1.0.1

  • npm: Add missing package.json description and keywords

1.0.0

  • Initial version