{"name":"tiny-readdir","description":"A simple promisified recursive readdir function.","version":"1.2.1","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"clean":"rimraf dist","compile":"tsc --skipLibCheck && tstei","compile:watch":"tsc --skipLibCheck --watch","prepublishOnly":"npm run clean && npm run compile"},"bugs":{"url":"https://github.com/fabiospampinato/tiny-readdir/issues"},"license":"MIT","author":{"name":"Fabio Spampinato","email":"spampinabio@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-readdir.git"},"keywords":["readdir","recursive","promise","simple","tiny"],"engines":{"node":">= 10.12.0"},"dependencies":{},"devDependencies":{"@types/node":"^14.14.9","rimraf":"^3.0.2","typescript":"^4.1.2","typescript-transform-export-interop":"^1.0.2"},"gitHead":"4b76168fc654e41c9db925c9d518b44be23840cb","homepage":"https://github.com/fabiospampinato/tiny-readdir#readme","_id":"tiny-readdir@1.2.1","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"dist":{"integrity":"sha512-AZ0fROOsF+t51Q2n7NaW+uNciWVUj0JeCRPTCm40HQAa6+4gRjHquZxICku61iTZ2Hnj7ZY2m8qq9Sm5rysjIw==","shasum":"e412895f2b6eb1df65174f7c348acbeb608047ab","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-1.2.1.tgz","fileCount":12,"unpackedSize":8506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf61OrCRA9TVsSAnZWagAALMAQAJR+9Fs39tknTJQ2BLJH\nFiBEVyvBJVoDcxbaM0zMFYgZv9w9OdlKgHA8bLh7FQGjbfsb9kFfaAtPj7uF\nDhrAALMj4VxgrumWOOHvACGCoG+wxahsyCIuWMlsm2wO5t0bMxOaRakFkkDF\nVi5Wg52ufECH8mlnLo59MuqFeDjGiH7dydxLhH9AEWtHlrrcByD21Ur/mf25\nuOg+I9E7mwscsrjFTDSY7JcH3TaWZPmKJn5GKiB2cFqk/sa+WXbvRmvpuTzn\n/fWi6+V2AW6yPyCDXeWBUaEteEtpaVZXrRZt67XCRZjpotrp8vpMqzE18G/W\nzAna560spMqNKkrYR9yELXIU+2jVi8vCJi1AR8ng81YadJAZ0wg5ScgGTGP3\n/3a1aGxmyoLRLksXGF2JcOgqOikjFHLcG7JAR9eqlRubAWbU8W4cgwTsbXXC\npPB8+oEkQrU1m6VdpFfYr34oNQvX/RsyUk/FGQTKCoAkjBckLr6Yrd1Xc5Ju\n9y+Ty+fa0+K6w63c8p+FcDPY6gGBllM7tWhsMWKi4mEBfldtOEGiIqk9kj04\nITyjGkVbx5vaj5YKsYRAloEwbP95m2MEbMakefspTt5Y6N5mf7mt8BfN3d2W\nMC/rHLtiGGGqL6+tGCHco9q1w4xoX2l/1LDAzAU1WwJ8arOQMt0Va9e/3aSc\nscmC\r\n=Occ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFnwiGP44U9riUh9E/Cpc3VIGbfK5PDhchPMRPF6BLL+AiAPRrwpUQF/+aOfNGyMkAyYZg7bekMo+czr6SuTcDD2bQ=="}],"size":3591,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-1.2.1.tgz"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-readdir_1.2.1_1609257898850_0.8238379132376956"},"_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\nconsole.log ( result.directories ); // => Array of absolute paths pointing to directories\nconsole.log ( result.files ); // => Array of absolute paths pointing to files\nconsole.log ( result.symlinks ); // => Array of absolute paths pointing to symlinks\n\nconsole.log ( result.directoriesNames ); // => Set of directories names found\nconsole.log ( result.filesNames ); // => Set of files name found\nconsole.log ( result.symlinksNames ); // => Set of symlinks names found\n\nconsole.log ( result.directoriesNamesToPaths ); // => Record of directories names found to their paths\nconsole.log ( result.filesNamesToPaths ); // => Record of files names found to their paths\nconsole.log ( result.symlinksNamesToPaths ); // => 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":1609257898982,"_cnpm_publish_time":1609257898982,"dist-tags":{"latest":"3.1.1"}}