{"name":"tiny-readdir","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-readdir.git"},"description":"A simple promisified recursive readdir function.","version":"2.0.0","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":"npm run clean && npm run compile && npm run test"},"keywords":["readdir","recursive","promise","simple","tiny"],"dependencies":{"promise-concurrency-limiter":"^2.0.0"},"devDependencies":{"@types/node":"^17.0.23","fava":"^0.0.6","tsex":"^1.1.1","typescript":"^4.6.3"},"gitHead":"b69813b89ef471d9b4d0afbaf02bec7e71b71e2e","bugs":{"url":"https://github.com/fabiospampinato/tiny-readdir/issues"},"homepage":"https://github.com/fabiospampinato/tiny-readdir#readme","_id":"tiny-readdir@2.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-ikWiEcdfz/lyIQlVMUAkEfVef4iLviHm32Np8Z/kSTZ5tbYBh0c9UhKT+Jn03Mb6hB0i2n8+kpPUE1eZcnobag==","shasum":"e80f22042e93dd76bb0877d87889a681a22b35e2","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-2.0.0.tgz","fileCount":12,"unpackedSize":15978,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEJbcqyutSLNQqQ0r3ngEaC7D+oqdvOW2wQoGpO2TM9AIgXzlPxTgz9Ihc2c6l6a/sZJ0hCY+honWGvIl4XsG6KRY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVYXXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmocDA//SHYUARdtkYfquj/yfx84oCk1W9/riHPLF3EKNZ5sMfHpLafc\r\n576pPgWPAkQHd5du2RD7LnnISCMkQsscHwH1KR0s546F4QGYGnPuIOczCKLH\r\n7RNQFMCwO0sM9aoDtP16XhIvzVVIDUDHigwtcbg9FoYTuzzy90dTVpfTsNbO\r\nAvUqlUiuEyL1CS0+AeoX7k3Uhpx+Y4FxdHCi9KNYqzfUevGNc4fn9YieGLGk\r\nD0tbfjgLBC3g6YXj/GmIyc0LhCuorIKi/qXRCVYg58Zyoy4Vnl2tAnDj37ua\r\n9yif4toAMGUw0QiJlH2qnbdpEc89KSTomPHBZOI3MxyYNSuygTY98zabwlQo\r\n8C0t9V0Mm3Vjruu1R4GrVSncnpr/dHtjKEFBPbLrqARvMOl6jueM1mZ3sGpm\r\nRBuNjtuUp3rPDaqtDEWSMzx3EjZ5eESwrZF2tc1DlNEA7v8+B1UvGXZDrDU9\r\n9RIhOX5xj/bv744lXDfLPkvRCE5nWeTB70I+H4x1R/wus4LnEJnQum4oLwED\r\nEexvjpSNEp957CCnBzuFjeI4lf0ipB18EM9js4zbsCun/SC6WZFeoVyxs17x\r\nM+pGPjfQtI/BiP8wHKrEKChB8IB2m4qS4B/q4VqfHjuorDdNlyjRTWJfbTdR\r\nNrNRx5SQfLY78Gsb0ynn0r9hy9C8LdH8oXY=\r\n=R392\r\n-----END PGP SIGNATURE-----\r\n","size":4267,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-2.0.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_2.0.0_1649771990905_0.08030024818360526"},"_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":1649771991067,"_cnpm_publish_time":1649771991067,"dist-tags":{"latest":"3.1.1"}}