Skip to content

v6.4.0

Latest
Compare
Choose a tag to compare
@thecodrr thecodrr released this 30 Sep 07:41

Features

Exclude symlinks

You can now specifically exclude symlinks from the crawling process. Here's how you can do that:

new fdir({ excludeSymlinks: true }).crawl().sync();

Thanks to @SuperchupuDev in #115

Custom glob functions

Previously, fdir only supported picomatch for globbing disallowing any customization in this area. While that worked really well for most people, it wasn't super flexible. Starting from this version, fdir supports changing the default glob function:

// using a custom function
const customGlob = (patterns: string | string[]) => {
  return (test: string): boolean => test.endsWith('.js');
};
const crawler = new fdir().withGlobFunction(customGlob).globWithOptions("**/*.js");

withGlobFunction accepts a glob factory function which you can use to perform intensive work only once. For example, picomatch provides a glob factory that optimizes and preprocesses your glob patterns increasing match significantly.

Thanks to @43081j in #98

Fixes

Other


New Contributors

Full Changelog: v6.3.0...v6.4.0