{"name":"tiny-readdir","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-readdir.git"},"description":"A simple promisified recursive readdir function.","version":"2.2.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":"4806856d78b02a6e76fe6590fdf416c5055576f0","bugs":{"url":"https://github.com/fabiospampinato/tiny-readdir/issues"},"homepage":"https://github.com/fabiospampinato/tiny-readdir#readme","_id":"tiny-readdir@2.2.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-bO4IgID5M2x5YQFBru/wREgT30YuA8aoOd/F8Rd6LKRIn1gOe9aREjT74J9EVukHqI/2RB+4SM1RgXM0gwxoWw==","shasum":"ad3770a29efae222beae06032389cbedab4b57bc","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-2.2.0.tgz","fileCount":16,"unpackedSize":20123,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAb1blohqJL5m/DczwJryCNu/vvv1EURuLdrJHImuSj4AiA6Efj1lmWlYG7uZAY0RUZdKEuEoOcTVNXRLhDTwH/7lg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfql1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6Ag/8CGdLNybsUZZXwIcQQVHAqXz1S/YESVdhLPqntAAL1qcT9Poo\r\nMRWYzPbfrq4MRJYBqclMNyhTcZMZEkduFJ0pTG8hOlXCcsrzo5TZ6Co/dXPB\r\nRoH9eQSXbwFZ3qZR1knJX0tNsEJ5OqwL4Zqv/wBaNBlT8qL02J8kSdrDZFWJ\r\nj1tX1dj8cat52vvxYaYYzeO4yFDBIdbEOOmbWLjO5E3v7ibIYn5T0q+bbOWX\r\nwfccq1xCFBo6d1G02wjVuaF1zmQ6cpLYp09fEMBuJ5CfL+gWf/52PNd+equ/\r\neH8YXhxG56Z8AJaCvx7g/aQMF0h4xfqhrvQvCNSIWxmpdTiduSzHKMwuw9CQ\r\n0U0hJQnvMxQx/F4JbWaqQ3evx4LqEfts0BJhy5XDrIbtL2p54NscqI/Q+Kzd\r\nR76kJa+eKkjQq6WUAmFXClxRFb/4bPMiqNesQ+KkP0IqjPoH//Yks2ptLe/G\r\nGffwENNzClkzri+1jMr549ePQEIoQpUdvDzeLq4ive7PSdVL4zTUn5FPBFKa\r\nMGknsvglb4i475bhTsH5kg9PAK5G8xwTHzbrHfiDYBOJP8K37XO0PaM0apsQ\r\nZ3wL1AYrzSd2myYpquTujMfuiLN10J2JWwxBgPi3SP5fWY1WnC8lELHLdxSy\r\nbF2SCsqywNKxbI2qHMD3aQzyNHefTEuRg2w=\r\n=jPFB\r\n-----END PGP SIGNATURE-----\r\n","size":4931,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-2.2.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.2.0_1669245301086_0.7283921383680554"},"_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":1669245301262,"_cnpm_publish_time":1669245301262,"dist-tags":{"latest":"3.1.1"}}