{"name":"tiny-readdir","description":"A simple promisified recursive readdir function.","version":"1.0.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":"d7502d966fbce530ef0e7414c92b7d66cb0b8e44","homepage":"https://github.com/fabiospampinato/tiny-readdir#readme","_id":"tiny-readdir@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"dist":{"integrity":"sha512-RzgpTO8qE56uXzVlbpOlLclf9myGlqfVtJyN201vVcS6GJvO7FTDcQt8nyuwa8sY6D0NSrvNsFvtQqALXCA/gQ==","shasum":"52fdbc32988dc79ea7eb7fb897d98e2d7b9a79ab","tarball":"http://registry-npm.ywwl.com/tiny-readdir/download/tiny-readdir-1.0.0.tgz","fileCount":12,"unpackedSize":6712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuVh5CRA9TVsSAnZWagAA3sAP/igpAeeB5qG6Lj/iOJ88\nvwcIQ17Zdt32QklI40DuWfGvxfd/K1yJe6xtGmOsjO7NF0YInSSO23FC6lXb\njrme1W/mE1BM+yRkZ0vM0FZ3Y8u6xxWyOKzUgkovYhAAxkWLQP8oehFT9iRX\n3xWnLF5KjswpRC182OeaBkORX2rPUiH9Zqf14DG6IPI+0rSN1cilXXHcPiQl\n0IHnaFDfyl7tbz819XyVzLTpNH+4DHXqhgC+QGpZ0l1ZtahaEal7grEyFpSW\n0088aFIBKyyI2cPNP1Ish/7ZDotdQdgJ+T13iVEBon65s6AceRLN3LohFwf3\n1z+uvMoy0/XdUUXuvynFc9twQEmj7alFvxsNc1DNDBWW3tanEkZJHuPuC04+\nU6y0ixeUIcoO/xw6XuSummcgzwRWNU8b1TWXjpncbehEa2g/uWQj029Hw0IN\nkzjC9XWW5j1LukIEq1kZo1O/NHT0M39ez5ZOjhimRFeVHwOvT9uN50mC5pU5\nheuudc54kcXWYa9/Sa5GP9qB5S/GxELyx2cYWQpfJBQNvZIph5pylrwXIsdf\nH6X/UcLAvDHiwW+mqAP2Zz+hxWZqwHJC3z1ZIjLyGhvRsn4sGjzXJ4q5iVxJ\nVvKwqJjqSZePPZU9PhtDSjJG/pqWpprl9m9WUPYRZfFYDlPepriVQTk+O1vi\nBNe1\r\n=JbFp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIClYSR2tKj9FdfWT+GfqZVDKyzl4qtVHTN48nAU/JmPuAiBiRyeuwfG8mY5zWkxb8mEjm0JHOffvm4byaikSw6NoHw=="}],"size":3096,"noattachment":false,"key":"/tiny-readdir/-/tiny-readdir-1.0.0.tgz"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-readdir_1.0.0_1605982329319_0.6152992554822772"},"_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":1605982329477,"_cnpm_publish_time":1605982329477,"dist-tags":{"latest":"3.1.1"}}