{"name":"tiny-readdir-glob","version":"1.23.0","keywords":["readdir","recursive","promise","simple","tiny","glob"],"_id":"tiny-readdir-glob@1.23.0","homepage":"https://github.com/fabiospampinato/tiny-readdir-glob#readme","bugs":{"url":"https://github.com/fabiospampinato/tiny-readdir-glob/issues"},"dist":{"shasum":"41f83a243062b98f1de06f0a3fbde62770653680","tarball":"http://registry-npm.ywwl.com/tiny-readdir-glob/download/tiny-readdir-glob-1.23.0.tgz","fileCount":15,"integrity":"sha512-ElwCbSNP9ElOsrxGHieDswd27w/72JyyrlMyFsP/hAA/xEZbt8euWTEunxQ6bapfiCtGW799Ip0I4HnQ+ZPd6g==","signatures":[{"sig":"MEQCIFruO91IhpmtXHE24o54ZVk702SUziPZ3JE0WzRFOfOnAiAY9gKRlWwowPFeNDd0rSZiy8p1kGDQA3NRUA2ESAWv9Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34126,"size":7426,"noattachment":false,"key":"/tiny-readdir-glob/-/tiny-readdir-glob-1.23.0.tgz"},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"a21ad25b212b89cb202b2b3db4f609b4c7b56c38","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"tsex prepare"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/tiny-readdir-glob.git","type":"git"},"_npmVersion":"10.2.3","description":"A simple promisified recursive readdir function, with support for globs.","directories":{},"_nodeVersion":"18.19.0","dependencies":{"zeptomatch":"^1.2.2","tiny-readdir":"^2.7.0","zeptomatch-explode":"^1.0.0","zeptomatch-unescape":"^1.0.0","zeptomatch-is-static":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"fava":"^0.3.1","tsex":"^3.0.1","typescript":"^5.3.2","@types/node":"^20.9.4"},"_npmOperationalInternal":{"tmp":"tmp/tiny-readdir-glob_1.23.0_1739121663935_0.33728396240934044","host":"s3://npm-registry-packages-npm-production"},"readme":"# Tiny Readdir Glob\n\nA simple promisified recursive readdir function, with support for globs.\n\n## Install\n\n```sh\nnpm install --save tiny-readdir-glob\n```\n\n## Usage\n\n```ts\nimport readdir from 'tiny-readdir-glob';\n\n// Let's recursively read into a directory using a glob\n\nconst aborter = new AbortController ();\nconst result = await readdir ( ['src/**/*.js'], {\n  depth: 20, // Maximum depth to look at\n  limit: 1_000_000, // Maximum number of files explored, useful as a stop gap in some edge cases\n  followSymlinks: true, // Whether to follow symlinks or not\n  ignore: ['**/.git', '**/node_modules'], // Globs, or raw function, that if returns true will ignore this particular file or a directory and its descendants\n  signal: aborter.signal, // Optional abort signal, useful for aborting potentially expensive operations\n  onDirents: dirents => console.log ( dirents ) // Optional callback that will be called as soon as new dirents are available, useful for example for discovering \".gitignore\" files while searching\n});\n\n// This is the basic information we'll get\n\nresult.directories; // => Array of absolute paths pointing to directories, filtered by the provided glob\nresult.files; // => Array of absolute paths pointing to files, filtered by the provided glob\nresult.symlinks; // => Array of absolute paths pointing to symlinks, filtered by the provided glob\n\n// This is more advanced information we'll get, which is useful in some cases\n\nresult.directoriesFound; // => Array of absolute paths pointing to directories, not fully filtered by the provided glob yet\nresult.filesFound; // => Array of absolute paths pointing to files, not fully filtered by the provided glob yet\nresult.symlinksFound; // => Array of absolute paths pointing to symlinks, not fully filtered by the provided glob yet\n\nresult.directoriesFoundNames; // => Set of directories names found\nresult.filesFoundNames; // => Set of files name found\nresult.symlinksFoundNames; // => Set of symlinks names found\n\nresult.directoriesFoundNamesToPaths; // => Record of directories names found to their paths\nresult.filesFoundNamesToPaths; // => Record of files name found to their paths\nresult.symlinksFoundNamesToPaths; // => Record of symlinks names found to their paths\n\nsetTimeout ( () => aborter.abort (), 10000 ); // Aborting if it's going to take longer than 10s\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1739121664094,"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_cnpm_publish_time":1739121664094,"dist-tags":{"latest":"2.0.0"}}