{"name":"tiny-readdir","version":"3.1.0","keywords":["readdir","recursive","promise","simple","tiny"],"license":"MIT","_id":"tiny-readdir@3.1.0","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"homepage":"https://github.com/fabiospampinato/tiny-readdir#readme","bugs":{"url":"https://github.com/fabiospampinato/tiny-readdir/issues"},"dist":{"shasum":"7b027c9fc4581c5a4009e13cc711169e408b56d2","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-3.1.0.tgz","fileCount":11,"integrity":"sha512-yem43/QRZzKWkxfnK1gZ8QglVfNs1WB22Me8pa3BlfmomWiCkvCa+84T6FXslbdfecqm7K7AQ78O9yolvZ6F4Q==","signatures":[{"sig":"MEYCIQDezUD60E9JdTSXNERJbN9zB/mVaWe0Xefof+ou80f8vwIhAOPFMA3Pc44PElUSoMNSbU38M6dUDk4zfcNnwV05OtKr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10500,"size":3711,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-3.1.0.tgz"},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"fe7c29a739b6e34ba8a801c37585ce619f8faca6","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","benchmark":"tsex benchmark","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"npm run compile && node test/index.js","benchmark:watch":"tsex benchmark --watch","benchmark:prepare":"cd tasks && git clone https://github.com/babel/babel.git"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/tiny-readdir.git","type":"git"},"_npmVersion":"10.2.3","description":"A simple promisified recursive readdir function.","directories":{},"_nodeVersion":"18.19.0","dependencies":{"promise-make-counter":"^1.0.2"},"_hasShrinkwrap":false,"devDependencies":{"fava":"^0.3.5","tsex":"^4.0.2","benchloop":"^2.1.1","typescript":"^5.9.3","@types/node":"^18.19.130"},"_npmOperationalInternal":{"tmp":"tmp/tiny-readdir_3.1.0_1771775288138_0.57676748118459","host":"s3://npm-registry-packages-npm-production"},"readme":"# Tiny Readdir\n\nA simple promisified recursive readdir function.\n\n## Install\n\n```sh\nnpm install tiny-readdir\n```\n\n## Usage\n\n```ts\nimport readdir from 'tiny-readdir';\n\n// Let's recursively read into a directory\n\nconst aborter = new AbortController ();\nconst result = await readdir ( '/foo/bar', {\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: ( targetPath, targetContext ) => /node_modules/.test ( targetPath ), // 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\nresult.files; // => Array of absolute paths pointing to files\nresult.symlinks; // => Array of absolute paths pointing to symlinks\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1771775288314,"_cnpm_publish_time":1771775288314,"dist-tags":{"latest":"3.1.1"}}