license-checker
Advanced tools
Comparing version 4.1.2 to 4.2.0
@@ -165,2 +165,10 @@ /* | ||
Object.keys(data).sort().forEach(function(item) { | ||
if (!data[item].licenses) { | ||
/*istanbul ignore else*/ | ||
if (colorize) { | ||
data[item].licenses = chalk.bold.red(UNKNOWN); | ||
} else { | ||
data[item].licenses = UNKNOWN; | ||
} | ||
} | ||
if (options.unknown) { | ||
@@ -167,0 +175,0 @@ if (data[item].licenses && data[item].licenses !== UNKNOWN) { |
var MIT_LICENSE = /ermission is hereby granted, free of charge, to any/; | ||
var BSD_LICENSE = /edistribution and use in source and binary forms, with or withou/; | ||
var WTFPL_LICENSE = /DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE/; | ||
var ISC_LICENSE = /The ISC License/; | ||
var MIT = /MIT\b/; | ||
var BSD = /BSD\b/; | ||
var ISC = /ISC\b/; | ||
var APACHE = /Apache License\b/; | ||
@@ -16,2 +18,4 @@ var WTFPL = /WTFPL\b/; | ||
return 'Undefined'; | ||
} else if (ISC_LICENSE.test(str)) { | ||
return 'ISC*'; | ||
} else if (MIT_LICENSE.test(str)) { | ||
@@ -23,2 +27,4 @@ return 'MIT*'; | ||
return 'WTFPL*'; | ||
} else if (ISC.test(str)) { | ||
return 'ISC*'; | ||
} else if (MIT.test(str)) { | ||
@@ -25,0 +31,0 @@ return 'MIT*'; |
@@ -5,3 +5,3 @@ { | ||
"author": "Dav Glass <davglass@gmail.com>", | ||
"version": "4.1.2", | ||
"version": "4.2.0", | ||
"contributors": [ | ||
@@ -8,0 +8,0 @@ "Andrew Couch <andy@couchand.com>", |
@@ -78,2 +78,18 @@ var vows = require('vows'), | ||
}, | ||
'ISC check': { | ||
topic: function() { | ||
return license('asdfasdf\nThe ISC License\nasdfasdf'); | ||
}, | ||
'should return ISC': function(data) { | ||
assert.equal(data, 'ISC*'); | ||
} | ||
}, | ||
'ISC word check': { | ||
topic: function() { | ||
return license('asdf\nasdf\nISC\nasdf\n'); | ||
}, | ||
'should return ISC': function(data) { | ||
assert.equal(data, 'ISC*'); | ||
} | ||
}, | ||
'Check for null': { | ||
@@ -80,0 +96,0 @@ topic: function() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39392
935