{"id":22222007,"url":"https://github.com/fabiospampinato/tiny-readdir","last_synced_at":"2025-07-27T16:32:12.016Z","repository":{"id":57377254,"uuid":"314874219","full_name":"fabiospampinato/tiny-readdir","owner":"fabiospampinato","description":"A simple promisified recursive readdir function.","archived":false,"fork":false,"pushed_at":"2024-06-30T16:32:29.000Z","size":50,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-11T19:11:36.848Z","etag":null,"topics":["promise","readdir","recursive","simple","tiny"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabiospampinato.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"fabiospampinato","custom":"https://www.paypal.me/fabiospampinato"}},"created_at":"2020-11-21T18:11:44.000Z","updated_at":"2024-06-30T16:32:32.000Z","dependencies_parsed_at":"2024-03-19T00:33:30.090Z","dependency_job_id":"1a020db0-9629-4e75-89aa-b7693a5d0781","html_url":"https://github.com/fabiospampinato/tiny-readdir","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"553a9321f0df99d58a0fe5363e6fdaf65bee1b6c"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Ftiny-readdir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Ftiny-readdir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Ftiny-readdir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Ftiny-readdir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiospampinato","download_url":"https://codeload.github.com/fabiospampinato/tiny-readdir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227817017,"owners_count":17824200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["promise","readdir","recursive","simple","tiny"],"created_at":"2024-12-02T23:16:31.735Z","updated_at":"2025-07-27T16:32:11.996Z","avatar_url":"https://github.com/fabiospampinato.png","language":"JavaScript","funding_links":["https://github.com/sponsors/fabiospampinato","https://www.paypal.me/fabiospampinato"],"categories":[],"sub_categories":[],"readme":"# Tiny Readdir\n\nA simple promisified recursive readdir function.\n\n## Install\n\n```sh\nnpm install tiny-readdir\n```\n\n## Usage\n\n```ts\nimport readdir from 'tiny-readdir';\n\n// Let's recursively read into a directory\n\nconst aborter = new AbortController ();\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 =\u003e /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 =\u003e 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\n// This is how we would abort the reactive read after 10s\n\nsetTimeout ( () =\u003e aborter.abort (), 10_000 ); // Aborting if it's going to take longer than 10s\n\n// This is the basic information we'll get\n\nresult.directories; // =\u003e Array of absolute paths pointing to directories\nresult.files; // =\u003e Array of absolute paths pointing to files\nresult.symlinks; // =\u003e Array of absolute paths pointing to symlinks\n\n// This is more advanced information we'll get, which is useful in some cases\n\nresult.directoriesNames; // =\u003e Set of directories names found\nresult.filesNames; // =\u003e Set of files name found\nresult.symlinksNames; // =\u003e Set of symlinks names found\n\nresult.directoriesNamesToPaths; // =\u003e Record of directories names found to their paths\nresult.filesNamesToPaths; // =\u003e Record of files names found to their paths\nresult.symlinksNamesToPaths; // =\u003e Record of symlinks names found to their paths\n```\n\n## License\n\nMIT © Fabio Spampinato\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Ftiny-readdir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiospampinato%2Ftiny-readdir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Ftiny-readdir/lists"}