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 0.0.7 to 0.0.8

4

lib/args.js

@@ -10,2 +10,3 @@ /*

json: require('path'),
csv: require('path'),
unknown: Boolean,

@@ -22,4 +23,3 @@ version: Boolean,

var raw = function (args) {
var parsed = nopt(known, shorts, (args || process.argv));
return parsed;
return nopt(known, shorts, (args || process.argv));
};

@@ -26,0 +26,0 @@

@@ -25,2 +25,3 @@

moduleInfo.repository = json.repository.url.replace('git://github.com', 'https://github.com').replace('.git', '');
moduleInfo.repository = json.repository.url.replace('git@github.com:', 'https://github.com/').replace('.git', '');
}

@@ -81,3 +82,3 @@ }

console.log('scanning', options.start);
console.log('scanning' , options.start);

@@ -106,1 +107,16 @@ read(options.start, function(err, json) {

};
exports.asCSV = function(sorted) {
var text = [['"module name"','"license"','"repository"'].join(',')];
Object.keys(sorted).forEach(function(key) {
var module = sorted[key],
line = [
'"' + key + '"',
'"' + (module.licenses || '') + '"',
'"' + (module.repository || '') + '"'
].join(',');
text.push(line);
});
return text.join('\n');
};

@@ -5,3 +5,3 @@ {

"author": "Dav Glass <davglass@gmail.com>",
"version": "0.0.7",
"version": "0.0.8",
"dependencies": {

@@ -8,0 +8,0 @@ "mkdirp": "^0.3.5",

@@ -60,2 +60,4 @@ NPM License Checker

Added support for `--csv /path/to/save.csv` to export the data as comma-separated values.
Requiring

@@ -62,0 +64,0 @@ ---------

@@ -30,4 +30,9 @@ var vows = require('vows'),

assert.isTrue(Object.keys(d).length > 70);
assert.equal(d['abbrev@1.0.4'].licenses, 'MIT');
assert.equal(d['abbrev@1.0.5'].licenses, 'MIT');
},
'and convert to CSV': function(d) {
var str = checker.asCSV(d);
assert.equal('"module name","license","repository"', str.split('\n')[0]);
assert.equal('"abbrev@1.0.5","MIT","http://github.com/isaacs/abbrev-js"', str.split('\n')[1]);
},
'should parse local without unknown': {

@@ -34,0 +39,0 @@ topic: function () {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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