Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
tiny-fsearch
Advanced tools
Fast and Simple File Search for NodeJS. Versatile find-in-files/search methods that can take in a range of options.
tiny-fsearch
is a native Node module available via NPM. It can be installed with.
$ npm install --save tiny-fsearch
The module consists of two available functions and promisified alternatives.
const tiny = require('tiny-fsearch');
/// File searching.
tiny.fsearch(searchable, filePaths, options);
/// Source String/Buffer query method.
tiny.fquery(searchable, source, options);
/// Promisified alternatives
tiny.promises.fsearch(...);
tiny.promises.fquery(...);
searchable [string|RegExp]
The string or RegExp to use for matching.
filePaths [string|string[]]
A file or file-paths to coordinate searching from (fsearch
only).
source [string|Buffer]
A source string or NodeJS Buffer to search from (fquery
only).
options [object]
The available options exposed for setting different search parameters.
interface ISearchOptions {
isRegex: boolean; // Denotes is using RegExp string. Toggled true if method is given RegExp object as searchable.
matchCase: boolean; // Case sensitivity of searching.
matchWholeWord: boolean; // Wraps internal RegExp logic with zero-width boundary characters (\b).
zeroIndexing: boolean; // Returns results with zero-indexing.
}
Both functions return similar hit-based results. For the fsearch
implementation a series of results will be return in an array, where as the fquery
returns only a singular result. The format of a search result is:
interface ISearchMatch {
filePath: string; // `fsearch` only.
hits: {
content: string; // Line content of match.
line: number; // Originating line number.
column: number; // Originating column number.
}[]
}
FAQs
A small and versatile file-search library
The npm package tiny-fsearch receives a total of 0 weekly downloads. As such, tiny-fsearch popularity was classified as not popular.
We found that tiny-fsearch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.