{"name":"tiny-readdir","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-readdir.git"},"description":"A simple promisified recursive readdir function.","version":"2.7.3","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["readdir","recursive","promise","simple","tiny"],"dependencies":{"promise-make-counter":"^1.0.1"},"devDependencies":{"@types/node":"^18.19.39","fava":"^0.3.4","tsex":"^4.0.2","typescript":"^5.5.2"},"_id":"tiny-readdir@2.7.3","gitHead":"f20ff8714df25b1f09db6cb16be48932cd621d85","bugs":{"url":"https://github.com/fabiospampinato/tiny-readdir/issues"},"homepage":"https://github.com/fabiospampinato/tiny-readdir#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-ae1CPk7/MRhdaSIfjytuCoCjcykCNfSH36MsD2Qq8A27apaVUV0nthOcCEjiBTTloBObq2ffvm0BycUayMWh3A==","shasum":"cfc9ceea334cd518fc0b0be35d95ebcd9db5af87","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-2.7.3.tgz","fileCount":18,"unpackedSize":33119,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEXUOoz1EF6q2+Gc2Jn03rN7nnkFfUvWMJxL69+76nHyAiEA4GNqQIue1egrVyp3VZzCYPe4qnEi6kWmfNEQz84Pg1c="}],"size":6580,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-2.7.3.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-readdir_2.7.3_1719765144316_0.4399338205356762"},"_hasShrinkwrap":false,"readme":"# Tiny Readdir\n\nA simple promisified recursive readdir function.\n\n## Install\n\n```sh\nnpm install --save tiny-readdir\n```\n\n## Usage\n\n```ts\nimport readdir from 'tiny-readdir';\n\nconst aborter = new AbortController ();\n\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 => /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\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\nresult.directoriesNames; // => Set of directories names found\nresult.filesNames; // => Set of files name found\nresult.symlinksNames; // => Set of symlinks names found\n\nresult.directoriesNamesToPaths; // => Record of directories names found to their paths\nresult.filesNamesToPaths; // => Record of files names found to their paths\nresult.symlinksNamesToPaths; // => Record of symlinks names found to their paths\n\nsetTimeout ( () => aborter.abort (), 10_000 ); // Aborting if it's going to take longer than 10s\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1719765144458,"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_cnpm_publish_time":1719765144458,"dist-tags":{"latest":"3.1.1"}}