Popularity
0.7
Stable
Activity
0.0
Stable
18
3
2
Description
Searches for files by content
Code Quality Rank:
L5
Monthly Downloads: 0
Programming language: TypeScript
License: Apache License 2.0
Tags:
Search
Filesystem
Node.Js
Promise
Path
Files
File
Finder
Find
Fs
Directory
Folder
Dir
Contains
Recursive
Contents
Sniffer
Walk
walker
grep
filesniffer
Latest version: v0.0.1
FileSniffer alternatives and similar modules
Based on the "Filesystem" category.
Alternatively, view FileSniffer alternatives based on common mentions on social networks and blogs.
-
chokidar
Minimal and efficient cross-platform file watching library -
fs-extra
Node.js: extra methods for the fs object like copy(), remove(), mkdirs() -
make-dir
Make a directory and its parents if needed - Think `mkdir -p` -
proper-lockfile
An inter-process and inter-machine lockfile utility that works on a local or network file system. -
write-json-file
Stringify and write JSON to a file atomically -
Filehound
Flexible and fluent interface for searching the file system -
istextorbinary
Determine if a filename and/or buffer is text or binary. Smarter detection than the other solutions. -
fs-write-stream-atomic
Like `fs.createWriteStream(...)`, but atomic.
A Non-Cloud Alternative to Google Forms that has it all.
SurveyJS JavaScript libraries allow you to easily set up a robust form management system fully integrated into your IT infrastructure where users can create and edit multiple dynamic JSON-based forms in a no-code form builder. Learn more now.
Promo
surveyjs.io
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of FileSniffer or a related project?
README
FileSniffer
Find files by matching contents
Installation
npm install --save filesniffer
Usage
// Searches for `someString` in `/tmp/test.txt`, returning all matches as an array:
const matches = await FileSniffer.create()
.path('/tmp/test.txt')
.collect(asArray())
.find('someString');
console.log(matches); // array of matching lines
// Use events for searching large files:
const sniffer = await FileSniffer.create();
// register event handlers
sniffer.on('match', (filename, line) => {
console.log(`Matching line ${line} found in ${filename}`);
});
sniffer.on('end', (filenames) => {
console.log(`All files that match: ${filenames}`);
});
// start search
sniffer
.path('/tmp')
.find('some string');
Documentation
For more examples and API details, see API documentation
Test
npm test
Test Coverage
To generate a test coverage report:
npm run coverage
Contributing
See [contributing guidelines](./CONTRIBUTING.md)