{"name":"tiny-readdir","description":"A simple promisified recursive readdir function.","version":"1.2.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":{},"devDependencies":{"@types/node":"^14.14.9","rimraf":"^3.0.2","typescript":"^4.1.2","typescript-transform-export-interop":"^1.0.2"},"gitHead":"44b135edabf227b2adf669dc5dfde18906ad4f2c","homepage":"https://github.com/fabiospampinato/tiny-readdir#readme","_id":"tiny-readdir@1.2.0","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"dist":{"integrity":"sha512-HI2cRoeXesAnkLDAPo+bEyMZn/Qel4Ef06xh2pGScDIyA1VQXLAnAY7Eor53C4x1OcKtoQXxA8r3CA76nGL7Zw==","shasum":"e8c669138d319a22ae4c9f73cb1d94db8c96903f","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-1.2.0.tgz","fileCount":12,"unpackedSize":8263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6zrjCRA9TVsSAnZWagAA+d4P/1A9dcZXO0Ny7Q5ZUaSf\ns6uObbJR6uMH666NLoGzVgn81W0U/1Bg7Q1g1DhuuNA3oMSoVwwEeKFktsuo\nuMrpEXb3JrxRw/v1U/157sQO9Z/cVhSxXhdhkcKB6oyzNzPFAxaxuHDI3wvV\naiU/AOm3mETmlrRAprRYcIQpvMwqB3kKWMdI1q7oaGLbb+6Xs/aISxxod8If\nPm1UgTJ3ZpsGpwussKKzco4zTpIbtxEmKAeaD3c6bOHsTEM4dv6AIvnATRji\nvvoKKgaES9Fdw2uD0gTje+LemvYFIf1BBT5IqS+/7UNknSpk6F+qJlpH7LhE\n1McwMIIP1ZrULU+aT4Adjt3jqd1+MyJAVK2mZe01wNmQUByYzvZhv0r1o8nM\nQir184JykS66yjyn9JXsEBldG1Tpvr1Vu/gRxZLUS7oXgfCwHruWCMHmtEGn\ngUqq8Yd6pdLAyF0TFWaUftJAf7GJCIfg0TF7CRYs2JFzrGEIMt5d2lJwgAlD\nAqxDBnsPtHJndNUw3szYTL8VLJOlYuSjV2AAW5qGvvNzsCGa3sxiaPX/UL5d\nf/kwNYWKpgO+gzI6JxSzdMstvRHZ1ne7LCfvEbSV8Vc0P2iDZ57AH6h2/4uf\nWejzokC4/JipeGoDXdBJDWav9znHQdEvpK7gJL7YmvfQkwl/vAH3daqBUzkT\nv/xD\r\n=p2tb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0+CJuqnupq1CJk5YpE35KuF0yHw6jbtDDJDnN76kL0gIgfqtCvlrcCvqx5JVVw9QphSZd32rxkoS8ElHz04aPQAQ="}],"size":3525,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-1.2.0.tgz"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-readdir_1.2.0_1609251555036_0.6678729805425472"},"_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":1609251555181,"_cnpm_publish_time":1609251555181,"dist-tags":{"latest":"3.1.1"}}