thecodrr / fdir

⚡ The fastest directory crawler & globbing library for NodeJS. Crawls 1m files in < 1s
https://thecodrr.github.io/fdir/
MIT License
1.51k stars 58 forks source link

Any slashes should be stripped off of the end before walking. #10

Closed OmgImAlexis closed 4 years ago

OmgImAlexis commented 4 years ago

Notice the double slash in the filename.

import * as fdir from 'fdir';

const go = async () => {
    const files = await fdir.async('/Users/xo/Downloads/', {});
    console.log(files); // ['/Users/xo/Downloads//Download.PDF']
};

go().catch(error => {
    console.error(error);
});