Giter Club home page Giter Club logo

node-find-files's People

Contributors

sudsy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-find-files's Issues

How to cancel an existing filereader?

I'm using this library hooked up to a text search field, which calls filereader.startSearch() every time the string changes, so as you type in 'bat', it would start a search for 'b', 'ba', and 'bat'. This results in multiple processes running at once, all but the last of which are out of date, so I was wondering if there's a method to stop any existing searches before starting a new one?

rename node_find_files to something Pascal cased

In the example, you have a variable named node_find_files .
That is a constructor, by an unspoken convention, all constructors in JS should be Pascal cased. So something like FindFiles would make more sense.

definition file is missing

can u please add d.ts file so it can be easily used in typescript project? i tryied to create pull request but code is using non-standard / old style with i cannot compile (u dont even have build script in package.json ...)

Error if no filterFunction option is added.

If you call finder the following way, you get 'undefined is not a function' errors for every file match, because there is no default filterFunction and the code assumes such function was set in the options.

 var finder = new FindFiles({
        rootFolder: "/home"
 });

If, for example, the filterFunction is set like this, everything works fine:

var finder = new FindFiles({
                rootFolder: "/home",
                filterFunction: function () {
                    return true;
                }
 });

Add max parallel operations configuration

I 've experienced performance issues on a server where I used this library over a big directory tree with lots of files.

I 've read your code and saw you are using asyn each.

Maybe adding a config parameter and using eachLimit instead of each so that files would be processed in chunks of parallel tasks, instead of in parallel as a whole.

it may fallback to no limiting if not configured

what do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.