Node.js library written in C++ for text in file search
⚡️ Supercharge keyword searches in file systems with blazing speed powered by C++.
Thanks to node-addon-api fast-find-in-files
is able to provide a
significantly faster search than other libraries. The library is built entirely in C++ and exposes its functionality
using TypeScript.
import { fastFindInFiles } from 'fast-find-in-files'
const directory = process.cwd()
const needle = 'needle' // also supports string RegExp: 'needle*', and RegExp instances: new RegExp('needle*')
const result = fastFindInFiles({ directory, needle })
console.log(result)
// [
// {
// filePath: '<path>',
// queryHits: [
// {
// line: 'It would appear there is a <needle> on this particular line',
// lineNumber: 1,
// link: '<path>:1:28',
// offset: 28,
// },
// ],
// totalHits: 1,
// },
// ]
yarn install
yarn build
yarn test
package.json
& lerna.json
(create PR -> merge)A Native Addon is a binary compiled from C/C++.
Native Addons compile into a Dynamically Linked Library (DLL).
If you’d like to contribute, start by searching through the issues and pull requests to see whether someone else has
raised a similar idea or question.
If you don’t see your idea listed, and you think it fits into the goals of this guide, do one of the following:
MIT