{"id":26719916,"url":"https://github.com/kuu12/recursive-sync-readdir","last_synced_at":"2025-03-27T18:29:45.482Z","repository":{"id":57349440,"uuid":"119929140","full_name":"kuu12/recursive-sync-readdir","owner":"kuu12","description":"Recursive readdirSync using non-recursive loop.","archived":false,"fork":false,"pushed_at":"2019-05-28T05:48:17.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-01T05:47:29.408Z","etag":null,"topics":["nodejs","readdirsync","recursive"],"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/kuu12.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}},"created_at":"2018-02-02T03:53:05.000Z","updated_at":"2019-05-28T05:48:19.000Z","dependencies_parsed_at":"2022-09-09T15:10:48.556Z","dependency_job_id":null,"html_url":"https://github.com/kuu12/recursive-sync-readdir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuu12%2Frecursive-sync-readdir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuu12%2Frecursive-sync-readdir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuu12%2Frecursive-sync-readdir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuu12%2Frecursive-sync-readdir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kuu12","download_url":"https://codeload.github.com/kuu12/recursive-sync-readdir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245901591,"owners_count":20691064,"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":["nodejs","readdirsync","recursive"],"created_at":"2025-03-27T18:29:44.835Z","updated_at":"2025-03-27T18:29:45.463Z","avatar_url":"https://github.com/kuu12.png","language":"JavaScript","readme":"# recursive-sync-readdir\n#### Recursive readdirSync, using `while` loop to prevent call stack from exceeding.\n\n[![NpmVersion](https://img.shields.io/npm/v/recursive-sync-readdir.svg)](https://www.npmjs.com/package/recursive-sync-readdir)\n[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/recursive-sync-readdir.svg)](https://www.npmjs.com/package/recursive-sync-readdir)\n\n## Motivation\nThere are some similiar libraries. But all of them use recursive function calls. \nIn asynchronous case it's all right, but in synchronous case it may cause ***Maximum call stack size exceeded***.\nThis library use `while` loop instead of recursive function calls, and **call stack is safe**.\n\n## Installation\n```shell\nnpm install recursive-sync-readdir\n```\n\n## Usage\n```javascript\nimport read from 'recursive-sync-readdir';\n\nconst files = read(\n    __dirname,                          // directory path\n    [                                   // exclude rules\n        /node_modules/,                 // match regular expression\n        '.git',                         // equals to string\n        path =\u003e path === 'dist',        // filter function returns true\n    ]\n);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuu12%2Frecursive-sync-readdir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuu12%2Frecursive-sync-readdir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuu12%2Frecursive-sync-readdir/lists"}