{"name":"tiny-readdir","description":"A simple promisified recursive readdir function.","version":"1.5.0","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":{"promise-concurrency-limiter":"^1.0.0"},"devDependencies":{"@types/node":"^14.14.9","rimraf":"^3.0.2","typescript":"^4.1.2","typescript-transform-export-interop":"^1.0.2"},"gitHead":"2f7fcf455485fb23408e384fd587d8c02d01bb5e","homepage":"https://github.com/fabiospampinato/tiny-readdir#readme","_id":"tiny-readdir@1.5.0","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Nep9qu34bOZApNkEnJu4V1WcgxW1kCGlYN8SYwMzZfqpv6f2E1n5vPHLczJqy2vOQ1rQG/m9fI3DQbIFXAQNGw==","shasum":"35ee72f989e466aad52a5d73e7ad16a802753c74","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-1.5.0.tgz","fileCount":11,"unpackedSize":14013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZdXXCRA9TVsSAnZWagAAjZAP/3NbRDQGTXBC32VAqfuL\nSJry0HiEeU+/rkwuO+WR0rpnK+EdBgn0+O5wSMsqCTN6T1jVKuCdAFJ7jmLp\neLizAO5mS29uAfl6LmBmHFjFnCgmu0ojtMkrpQlCHP23C6JnPjNohWTwQ/5J\nS5vcG5n/tJ5ZKdraA233if1COMBCttAU91tpE0gpmAnlgMRt+nSd81PPqRtV\npc6gDWeXDfYIPkXwnTyvbTSRuZarBwAkBscoTTWRY1JMpsZlXSKrE0u1nJ7s\nnCwbM85hdDyZQiaUR99Yt8j0Dk+goEZkDRZSUv9awl8pDHbuPmk/WtzmD55N\n5m07Th8TQNE+x9Nq+bJrQFb9hUCSgoJAJO1R2xKvDrID8gJhcAQPTXedmnK6\n5SkJTjBt7yWcZ/Pr30bKb/K3QzEl+nYLWmhxCyM1KG/e5GxxCp1ozoY6IeJ7\nSgNE4VFaXu9aTpfiDxb2trH0zr0v0nveSQFINPzZ87Ou9AdpUz/kGXum/qwm\n5piMK+M+6aCLNQNxnM7p7BbJFojNZKGWmkvGYSNepEBkVF4N+0LtUUviIOk9\njr928FPq7oQEBt7SGjh6fIP7JkObkc2bHvfLbumGb04TSMvHpw/aBiJu5Z90\nvWHC8JSromdbhROkaPxwcRAIR/xKcQeGyt8BfsJc1nOdsJPeYG25UTTBsiLa\n8uw7\r\n=H43n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFLupMY1P++tVLNjdFH7jGyEH9CY2Wlkw6AWJkQvUirMAiBo5d4ymbsAGrVJdu+YGFkAc1O5V+rIJnEHSngzweg5dA=="}],"size":4358,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-1.5.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-readdir_1.5.0_1617286614641_0.8944657511544643"},"_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":1617286614768,"_cnpm_publish_time":1617286614768,"dist-tags":{"latest":"3.1.1"}}