{"name":"tiny-readdir","description":"A simple promisified recursive readdir function.","version":"1.4.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":"e2450162364c90780f6801b236881ae9f6490e3a","homepage":"https://github.com/fabiospampinato/tiny-readdir#readme","_id":"tiny-readdir@1.4.0","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"dist":{"integrity":"sha512-4a6kcRKum4FhHA4W24yd6DkDugWijUb7XbnSw+YluPEiqDvSjIue8lk9v9ZPso00+D8r3DQrtIdYF7AiTW+I7w==","shasum":"efa05466f5c3c051fa9e6db2436c6232abe275fb","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-1.4.0.tgz","fileCount":11,"unpackedSize":12388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZDqoCRA9TVsSAnZWagAAO28P/RQH1eKC4yQiRpWf3xp5\nguxXJ6qa+SAnXJjLRct36Y4jyiFqAshj2zIhPBF54O7t416Cg1FbHg0sb3FQ\n3mJDBQluOHR1guUThEH5b6nMGXFbcf7Uqr0ej5KI1r7BxY0+BbbAd4nJ5+/X\nljsk+wn/ilW4uTB4EyN5d9NyQJohl7Z0yWzbMgSscrWA8zWtTQIw0RYe9KPg\nLDo4ixqGHIkW5ce65/L7BGrjGXZcKtoBVtK7HmHUc8trbacjNEPrVLwjJi5c\nhRyWGqZ4Mhgq7BO/IXTHuNLUlLOUVPo429e5fYNo1rJ1xGCAePAmHIbkLHiB\nEANaG+u7i4nujrA0cms0Ii4A1lf29IgTx1/o3stUVhtDPUkk1xPseFybfml8\nReYJVIJra85yoAa6a9rwcokBYKt1m6wrw/et4PoF0w8ie4rnMq94GqDgxOv3\nJE9j4ynRCQEf6FHMSuS5BoVCf+XWw6ZTNDq0Gkp1NXAnYBV9zFacOk2TMPVF\n/7kzkuTOFX5yzQlDTEqWOanCG1dW2xJyAH/nRmkkglFiwcRJPdjk/HQ3smbk\nJyvdgVdNXFtEGX3jrFwZqcpJM50i1EyQrQaTStn2oFU29uW1YNmGEC7WbmQU\nPntX+Nfeb5nQbJZ4WaP6Xac3tbWJHbutwfEaBEqfOzcxlqwLQcHJN37jLZlD\ngIbG\r\n=4R5M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHibm2I7HuFgyTElleQrWGn4LOmEFCGRnLr5SJsk61CXAiEAxtdJzAacwKuox+LsqIp/KNkuH2GM0/KNG9Zg70nEX54="}],"size":4187,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-1.4.0.tgz"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-readdir_1.4.0_1617181352516_0.6895279228341094"},"_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":1617181352668,"_cnpm_publish_time":1617181352668,"dist-tags":{"latest":"3.1.1"}}