Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

license-checker

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

license-checker - npm Package Compare versions

Comparing version 4.1.2 to 4.2.0

8

lib/index.js

@@ -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*';

2

package.json

@@ -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() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc