{"name":"tiny-readdir","version":"3.0.0","keywords":["readdir","recursive","promise","simple","tiny"],"license":"MIT","_id":"tiny-readdir@3.0.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":"abc2591169049e0ae898da8c4d541fc67cd56a8a","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-3.0.0.tgz","fileCount":11,"integrity":"sha512-mcmSZ1pTOcvNBO0ffXQo9DSAbZe2Ad7kXHrG4O9K4liVCalWUlJg+5BkXgOjp0pOGzgpXSijYEd6FV9FVWHNnA==","signatures":[{"sig":"MEQCIHYbf6f+Cfc3QcXEbgHIUg9kqss8+qx3Zj3/Wwlm780nAiBhi+h2vYkkWEZIelodeHKNoduPzo/UGuFgvT+ZDw+c8g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10359,"size":3672,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-3.0.0.tgz"},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"162af78b321f06ad0e059a49dc07eb2db0fad918","scripts":{"test":"node test/index.js","clean":"tsex clean","compile":"tsex compile","benchmark":"tsex benchmark","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"npm run compile && npm run test","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.0.0_1771766663744_0.7467724238938938","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":1771766663904,"_cnpm_publish_time":1771766663904,"dist-tags":{"latest":"3.1.1"}}