find-in-files
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -28,3 +28,3 @@ 'use strict'; | ||
fileFilter = new RegExp(fileFilter); | ||
} else { | ||
} else if (typeof fileFilter === 'undefined') { | ||
fileFilter = new RegExp('.*'); | ||
@@ -31,0 +31,0 @@ } |
{ | ||
"name": "find-in-files", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A simple tool to search text patterns across multiple files", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -58,2 +58,11 @@ 'use strict'; | ||
it('should accept a regex object for fileFilter', function (done) { | ||
findInFiles.find(stringOne, '.', /.txt$/) | ||
.then(function(result) { | ||
result['test/fileOne.txt'].count.should.equal(1); | ||
result.should.not.have.property('test/fileOne.md'); | ||
done(); | ||
}); | ||
}); | ||
it('should find strings in all files', function (done) { | ||
@@ -60,0 +69,0 @@ findInFiles.find(stringOne, '.') |
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
17498
113