{"name":"tiny-readdir","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-readdir.git"},"description":"A simple promisified recursive readdir function.","version":"2.1.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":"npm run test:native && npm run test:yielding","test:native":"fava '**/native.js'","test:yielding":"node test/yielding.js","prepublishOnly":"npm run clean && npm run compile && npm run test"},"keywords":["readdir","recursive","promise","simple","tiny"],"devDependencies":{"@types/node":"^18.11.9","fava":"^0.0.7","tsex":"^1.1.3","typescript":"^4.9.3"},"gitHead":"3d595c777d579180505a7033660b371843cfeba1","bugs":{"url":"https://github.com/fabiospampinato/tiny-readdir/issues"},"homepage":"https://github.com/fabiospampinato/tiny-readdir#readme","_id":"tiny-readdir@2.1.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-h3gMXGnxJRBWRcPaQgjXi7vQMhT66Kqb16gEXJGLzfGC4tMa42lLvAc2UzJiT2imNzBKrtD7cmA11iREizHLvA==","shasum":"526edd36066e6a7cbf194f4a2516c0f0e5f14be2","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-2.1.0.tgz","fileCount":13,"unpackedSize":19460,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2v4tlDMGQEtGOR8pwIUo0haM3Vx6O5uCB1KXVDtIzuAiEAhuoxZhse+O7S5xzxRMNfgjrM+RgYNtEcbvR4fPo28Zw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeWc4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqqiw//bYKltW/683BKXjY4RkQhByomsWmvHAJlmIcgaTMlIX9A7hsp\r\n61GZ5manDkfbcNgGMBuE5eaK/v+WawNxw/fXFNmoGZ/Rbj3pPkNq87TINKRa\r\nDhWm9AW9lgMgBuDTmUp3jUKi7583Rt9dRJ8ULsKNfrt2Lr4gjNBuQELr+RCs\r\nUBndfdXFQdGfRsMKu71psI8JWQFmWzgLI3rIw7T2nwrti2EVZa4bdKcM/bYo\r\nUgL5nIWhvDXUQ/HNQwKLZm7yqPiQhs+9W+/HriMTTDI532AL3ctdYoUo8/Hp\r\nUliqyAaXx47phRkIsbqPaffVZbQ33bIfBSmPb6n9nA0fx/+eM4QW7duut8S1\r\n7CyyFumbDHUEAocmpU2dMm5x9Q+LvncOO3KsdvqoSlcp8wtldsUcw/KspJnK\r\nV/kg3XDoVltOL0yxwlom6/AmmAyQgxNiYZ2nD7C+3Qsp682zjGGRWsQSAWO2\r\nlMrz/Hj/IWOKwPeXg8vZvZWoG1UYMXH0UR+Ep+gZVVpxifDBDizRDisJWhd0\r\nu1km7f0slLcr7ibPZzAXSzZ+fNd8IuHwnmy05GbAPmNbmUE3Gzzj38f/EFTu\r\nRBLdSIIS+cXy5Y21tG3odcnVquJF7sBGKKGjZ57jiS4kYyS4KGe2RI7ft8uH\r\nzuF07dvB8QEPaOEnIjnFvGmrpk3hkMholfU=\r\n=e98e\r\n-----END PGP SIGNATURE-----\r\n","size":4678,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-2.1.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.1.0_1668900664782_0.14996406500922843"},"_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":1668900664950,"_cnpm_publish_time":1668900664950,"dist-tags":{"latest":"3.1.1"}}