{"name":"tiny-readdir-glob","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-readdir-glob.git"},"description":"A simple promisified recursive readdir function, with support for globs.","license":"MIT","version":"2.0.0","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"benchmark":"tsex benchmark","benchmark:watch":"tsex benchmark --watch","benchmark:prepare":"cd tasks && git clone https://github.com/babel/babel.git","clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"npm run compile && node test/index.js"},"keywords":["readdir","recursive","promise","simple","tiny","glob"],"dependencies":{"tiny-readdir":"^3.1.1","zeptomatch":"^2.1.0"},"devDependencies":{"@types/node":"^18.19.130","benchloop":"^2.1.1","fava":"^0.3.5","tsex":"^4.0.2","typescript":"^5.9.3"},"gitHead":"736582bee03bed185c8129cd74d48a77b549070a","_id":"tiny-readdir-glob@2.0.0","bugs":{"url":"https://github.com/fabiospampinato/tiny-readdir-glob/issues"},"homepage":"https://github.com/fabiospampinato/tiny-readdir-glob#readme","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-1zAGi76CspOE4MjMrsx2OeLpvjiHyprFTuJ1O3k5C1qU09GpltOL+zx5rw9CaVQ/qkpkmCfc09TS2fV52GJrrw==","shasum":"c4d20a42b95802f041a13c01b863036c1310b2cd","tarball":"http://registry-npm.ywwl.com/tiny-readdir-glob/download/tiny-readdir-glob-2.0.0.tgz","fileCount":9,"unpackedSize":9058,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCKL1hEWSQDeRxKDPNr/v0rVLxovABXYw3uXdmulZZy6wIhAKK6nUzyRYK2wBy3cFbLpWMC2ltM04aQB9Sd1dyyrpgz"}],"size":3633,"noattachment":false,"key":"/tiny-readdir-glob/-/tiny-readdir-glob-2.0.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tiny-readdir-glob_2.0.0_1771780820260_0.2666238418049336"},"_hasShrinkwrap":false,"readme":"# Tiny Readdir Glob\n\nA simple promisified recursive readdir function, with support for globs.\n\nGlobs are expressed in [`zeptomatch`](https://github.com/fabiospampinato/zeptomatch)'s flavor.\n\n## Install\n\n```sh\nnpm install 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  cwd: process.cwd (), // Directory to start the search from, defaults to process.cwd()\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 how we would abort the recursive read after 10s\n\nsetTimeout ( () => aborter.abort (), 10_000 ); // Aborting if it's going to take longer than 10s\n\n// This is what the result object will look like\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\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1771780820407,"_cnpm_publish_time":1771780820407,"dist-tags":{"latest":"2.0.0"}}