Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support ECLIPSE #240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/license.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var MIT = /\bMIT\b/;
var BSD = /\bBSD\b/;
var ISC = /\bISC\b/;
var GPL = /\bGNU GENERAL PUBLIC LICENSE\s*Version ([^,]*)/i;
var ECLIPSE = /Eclipse Public License/;
var LGPL = /(?:LESSER|LIBRARY) GENERAL PUBLIC LICENSE\s*Version ([^,]*)/i;
var APACHE = /\bApache License\b/;
var WTFPL = /\bWTFPL\b/;
Expand All @@ -32,6 +33,8 @@ module.exports = function(str) {
}
if (typeof str === 'undefined' || !str) {
return 'Undefined';
} else if (ECLIPSE.test(str)) {
return 'ECLIPSE*';
} else if (ISC_LICENSE.test(str)) {
return 'ISC*';
} else if (MIT_LICENSE.test(str)) {
Expand Down Expand Up @@ -80,4 +83,4 @@ module.exports = function(str) {
return null;
}
}
};
};