{"id":25837245,"url":"https://github.com/devtin/deep-list-dir","last_synced_at":"2025-03-01T02:48:03.467Z","repository":{"id":38022836,"uuid":"267359995","full_name":"devtin/deep-list-dir","owner":"devtin","description":"Deeply lists a directory filtering files by given pattern(s)","archived":false,"fork":false,"pushed_at":"2023-03-04T20:44:03.000Z","size":357,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T07:36:54.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/devtin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2020-05-27T15:41:30.000Z","updated_at":"2022-10-06T16:36:50.000Z","dependencies_parsed_at":"2024-06-19T04:00:57.800Z","dependency_job_id":"8e46550f-bb80-441f-a65a-6ee27c38013f","html_url":"https://github.com/devtin/deep-list-dir","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"9fe80f607c8b1cb8638807a66e70123f91d7252c"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtin%2Fdeep-list-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtin%2Fdeep-list-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtin%2Fdeep-list-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtin%2Fdeep-list-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devtin","download_url":"https://codeload.github.com/devtin/deep-list-dir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241309091,"owners_count":19941726,"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":[],"created_at":"2025-03-01T02:48:02.999Z","updated_at":"2025-03-01T02:48:03.453Z","avatar_url":"https://github.com/devtin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deep-list-dir\n\u003e Deeply lists a directory filtering files by given pattern(s)\n\n\u003ca href=\"https://www.npmjs.com/package/deep-list-dir\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/deep-list-dir.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n[![tests](https://github.com/devtin/deep-list-dir/workflows/test/badge.svg)](https://github.com/devtin/deep-list-dir/actions)\n\nThis module recursively lists all files in given directory (including sub-folders) by early filtering the results using the\ngiven `pattern` which can be an array of \u003ca href=\"https://www.npmjs.com/package/minimatch\" target=\"_blank\"\u003eminimatch\u003c/a\u003e\nexpressions or `RegExp`.\n\nIt will return all matching results. \u003ca href=\"https://www.npmjs.com/package/minimatch\" target=\"_blank\"\u003eminimatch\u003c/a\u003e\nnegative patterns are used to explicitly exclude a path from being scan / returned.\n\n## Example\n\nTake the following file structure:\n\n```\n\u003cdirectory\u003e\n├── dir1\n│   └── README.md\n├── dir2\n│   └── sub-dir2\n│       ├── hi.txt\n│       └── index.js\n├── index.js\n└── README.md\n```\n\n...and the following script:\n\n```js\nconst { deepListDir, deepListDirSync } = require('deep-list-dir')\n\ndeepListDir('\u003cdirectory\u003e',\n  {\n    pattern: ['*.md'], // minimatch or RegExp\n    // base: '', set parent base to something different than given directory\n    // minimatchOptions: { matchBase: true } // minimatch options\n  }\n).then(console.log)\n```\n\nWill output\n\n```json\n[\n  \"dir1/README.md\",\n  \"README.md\"\n]\n```\n\nA sync version is also provided:\n\n```js\nconsole.log(deepListDirSync('\u003cdirectory\u003e', { pattern: '*.js'})) \n```\n\nOutput:\n\n```json\n[\n  \"dir2/sub-dir2/index.js\",\n  \"index.js\"\n]\n```\n\n* * *\n\n### License\n\n[MIT](https://opensource.org/licenses/MIT)\n\n\u0026copy; 2020-present Martin Rafael Gonzalez\n\u003ctin@devtin.io\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevtin%2Fdeep-list-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevtin%2Fdeep-list-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevtin%2Fdeep-list-dir/lists"}