Socket
Socket
Sign inDemoInstall

nlf

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlf - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

3

lib/license-collection.js

@@ -8,2 +8,5 @@

* @license The MIT License
*
* @@NLF-IGNORE@@
*
*/

@@ -10,0 +13,0 @@

21

lib/license-find.js

@@ -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

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