This package contains basic operations for handling search in file system.
Users can easily install dthis package by npm package manager by running the following command:
npm install @asmfx/search-fs
find function provides search interface to recursively traversing and find files/directories starting from startingPath directory.
import { find } from "@asmfx/search-fs"
...
const result = await find(startingPath, { pattern: /SOME_REGEX_PATTERN_FOR_SEARCH/g });
...grep function provides search interface to recursively traversing in the filesystem and searching for content inside the provided files.
import { grep } from "@asmfx/search-fs"
...
const result = await grep(paths, { pattern: /SOME_REGEX_PATTERN_FOR_SEARCH/g });
...