0.1.3 • Published 1 year ago

@zkud/fs-find v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

fs-find

Flexible search of file content

Hits-of-Code CI Code QL codecov

const {core} = require('@zkud/fs-find');
const {Searcher, Query} = core;

const searcher = new Searcher();
const results = await searcher.search(
    new Query()
        .from('./src/')
        .filterBy(({path}) => path.endsWith('.js'))
        .mapAs((content) => content.match(/class/g))
        .reduceAs((a, b) => a.concat(b), []),
);

// -> ['class', 'class', ...]
console.log(results);

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 16.* or higher is required.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the npm install command:

$ npm install @zkud/fs-find

Features

  • Performant cached FILTER-MAP-REDUCE read-only queries to a file system
  • Super-high test coverage
  • High flexibility to use your own file systems / specific searches

Docs & Community

Security Issues

If you discover a security vulnerability, please see Security Policies and Procedures.

License

MIT

0.1.3

1 year ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago