package-license
Advanced tools
Comparing version 0.2.1 to 0.4.0
12
index.js
@@ -37,7 +37,15 @@ var fs = require('fs'); | ||
if (potentialFilenames[i].toLowerCase() === files[j].toLowerCase()) { | ||
return licenseFromString(fs.readFileSync(path.resolve(packagePath, files[j]), 'utf8')); | ||
var licenses = licenseFromString(fs.readFileSync(path.resolve(packagePath, files[j]), 'utf8')); | ||
// if only one license is found remove array | ||
if (_.isArray(licenses) && licenses.length === 1) licenses = licenses[0]; | ||
// remove duplicates | ||
if (_.isArray(licenses) && licenses.length > 1) licenses = _.uniq(licenses); | ||
return licenses; | ||
} | ||
} | ||
} | ||
return null; | ||
return []; | ||
} |
{ | ||
"name": "package-license", | ||
"version": "0.2.1", | ||
"version": "0.4.0", | ||
"description": "Checks the filesystem for potential license files and attempts to detect what they are", | ||
@@ -19,6 +19,13 @@ "main": "index.js", | ||
"author": "Duncan Wong <baduncaduncan@gmail.com>", | ||
"contributors": [{ | ||
"name": "Alexander Wunschik", | ||
"email": "dev@wunschik.net" | ||
}], | ||
"license": "Apache2", | ||
"bugs": { | ||
"url": "https://github.com/AceMetrix/package-license/issues" | ||
}, | ||
"dependencies": { | ||
"underscore": "~1.5.2" | ||
} | ||
} |
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
14052
44
1
+ Addedunderscore@~1.5.2
+ Addedunderscore@1.5.2(transitive)