Skip to content

Commit

Permalink
Merge pull request davglass#4 from gugu/patch-1
Browse files Browse the repository at this point in the history
Support zero parity license for husky module
  • Loading branch information
RSeidelsohn committed Mar 16, 2021
2 parents d868fda + f89cc19 commit 9511440
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/license.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const LGPL = /(?:LESSER|LIBRARY) GENERAL PUBLIC LICENSE\s*Version ([^,]*)/i;
const APACHE_VERSION = /\bApache License\s*Version ([^,\s]*)/i;
const APACHE = /\bApache License\b/;
const WTFPL = /\bWTFPL\b/;
const ZERO_PARITY_LICENSE = /\bParity\b/;
// https://creativecommons.org/publicdomain/zero/1.0/
const CC0_1_0 = /The\s+person\s+who\s+associated\s+a\s+work\s+with\s+this\s+deed\s+has\s+dedicated\s+the\s+work\s+to\s+the\s+public\s+domain\s+by\s+waiving\s+all\s+of\s+his\s+or\s+her\s+rights\s+to\s+the\s+work\s+worldwide\s+under\s+copyright\s+law,\s+including\s+all\s+related\s+and\s+neighboring\s+rights,\s+to\s+the\s+extent\s+allowed\s+by\s+law.\s+You\s+can\s+copy,\s+modify,\s+distribute\s+and\s+perform\s+the\s+work,\s+even\s+for\s+commercial\s+purposes,\s+all\s+without\s+asking\s+permission./i; // jshint ignore:line
const PUBLIC_DOMAIN = /[Pp]ublic[\-_ ]*[Dd]omain/;
Expand Down Expand Up @@ -41,6 +42,10 @@ module.exports = function exports(str = 'undefined') {
if (typeof str === 'undefined' || !str || str === 'undefined') {
return 'Undefined';
}

if (ZERO_PARITY_LICENSE.test(str)) {
return 'Zero Parity*';
}

if (ISC_LICENSE.test(str)) {
return 'ISC*';
Expand Down

0 comments on commit 9511440

Please sign in to comment.