Comparing version 0.2.1 to 0.2.2
@@ -8,2 +8,5 @@ | ||
* @license The MIT License | ||
* | ||
* @@NLF-IGNORE@@ | ||
* | ||
*/ | ||
@@ -10,0 +13,0 @@ |
@@ -9,2 +9,4 @@ /** | ||
* @license The MIT License | ||
* | ||
* @@NLF-IGNORE@@ | ||
* | ||
@@ -60,3 +62,5 @@ */ | ||
} | ||
]; | ||
], | ||
// pattern to deliberately exclude a file | ||
excludePattern = /@@NLF-IGNORE@@/; | ||
@@ -76,8 +80,11 @@ /** | ||
for (licenseIndex = patterns.length - 1; licenseIndex >= 0; licenseIndex--) { | ||
pattern = patterns[licenseIndex]; | ||
for (regexIndex = pattern.regex.length - 1; regexIndex >= 0; regexIndex--) { | ||
if (pattern.regex[regexIndex].test(text)) { | ||
output.push(pattern.name); | ||
break; | ||
// ignore files that have the ignore flag - e.g. the nfl project itself | ||
if (!excludePattern.test(text)) { | ||
for (licenseIndex = patterns.length - 1; licenseIndex >= 0; licenseIndex--) { | ||
pattern = patterns[licenseIndex]; | ||
for (regexIndex = pattern.regex.length - 1; regexIndex >= 0; regexIndex--) { | ||
if (pattern.regex[regexIndex].test(text)) { | ||
output.push(pattern.name); | ||
break; | ||
} | ||
} | ||
@@ -84,0 +91,0 @@ } |
@@ -159,2 +159,3 @@ /** | ||
matchedFile = files[fileIndex]; | ||
// exclude files found in node_modules directories | ||
@@ -161,0 +162,0 @@ if (!matchNodeModules.test(matchedFile)) { |
@@ -6,3 +6,3 @@ { | ||
"author": "Ian Kelly <iandotkelly@gmail.com>", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"license": "MIT", | ||
@@ -9,0 +9,0 @@ "bin" : { |
@@ -0,1 +1,3 @@ | ||
<!-- @@NLF-IGNORE@@ --> | ||
# Node License Finder (nlf) | ||
@@ -2,0 +4,0 @@ |
@@ -5,2 +5,4 @@ | ||
* @description Unit tests for the license-find.js module | ||
* | ||
* @@NLF-IGNORE@@ | ||
*/ | ||
@@ -7,0 +9,0 @@ |
/** | ||
* @description Unit tests for the license-find.js module | ||
* | ||
* @@NLF-IGNORE@@ | ||
*/ | ||
@@ -4,0 +6,0 @@ |
Sorry, the diff of this file is not supported yet
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
308664
1239
121