{"id":20375070,"url":"https://github.com/leelow/clean-directory","last_synced_at":"2026-05-10T00:47:37.994Z","repository":{"id":57199768,"uuid":"87203059","full_name":"Leelow/clean-directory","owner":"Leelow","description":"🛁 ✨ A tiny module to clean a directory selecting which files or directories to keep.","archived":false,"fork":false,"pushed_at":"2019-02-25T19:45:31.000Z","size":226,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T07:39:14.669Z","etag":null,"topics":["clean","clear","delete","directory","empty","folder","javascript","js","node","nodejs","remove"],"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/Leelow.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":"2017-04-04T15:24:10.000Z","updated_at":"2018-12-13T06:49:57.000Z","dependencies_parsed_at":"2022-09-16T15:00:52.250Z","dependency_job_id":null,"html_url":"https://github.com/Leelow/clean-directory","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/Leelow%2Fclean-directory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leelow%2Fclean-directory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leelow%2Fclean-directory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leelow%2Fclean-directory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leelow","download_url":"https://codeload.github.com/Leelow/clean-directory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241923900,"owners_count":20043100,"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":["clean","clear","delete","directory","empty","folder","javascript","js","node","nodejs","remove"],"created_at":"2024-11-15T01:28:41.033Z","updated_at":"2026-05-10T00:47:37.951Z","avatar_url":"https://github.com/Leelow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clean-directory\n\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build Status][travis-image]][travis-url]\n[![Build Status][appveyor-image]][appveyor-url]\n[![Codacy Coverage][codacy-coverage-image]][codacy-coverage-url]\n[![Codacy Grade][codacy-grade-image]][codacy-grade-url]\n[![Dependencies][dependencies-image]][dependencies-url]\n[![Dev-dependencies][dev-dependencies-image]][dev-dependencies-url]\n[![JavaScript Style Guide][javascript-standard-image]][javascript-standard-url]\n\nA tiny module to clean a directory selecting which files or directories to keep.\n\n## Install\n\n```\n$ npm install --save clean-directory\n```\n\n## Usage\n\n```js\nconst invert = require('clean-directory');\n\n// empty the directory\nclean('/path/to/dir'); \n\n// empty the directory keeping a and its contents\nclean('/dir', 'a/**');\n\n// multiple patterns are possible\nclean('/dir', ['a/**', 'b/**']);\n```\n\n## Test and coverage\nYou just have to clone the repo and run\n\n```\n$ npm test\n$ npm run coverage\n```\n\n## License\n\n[MIT](LICENSE) © [Léo Lozach](https://github.com/Leelow)\n\n[downloads-image]: https://img.shields.io/npm/dt/clean-directory.svg?maxAge=3600\n[downloads-url]: https://www.npmjs.com/package/clean-directory\n[travis-image]: https://travis-ci.org/Leelow/clean-directory.svg?branch=master\n[travis-url]: https://travis-ci.org/Leelow/clean-directory\n[appveyor-image]: https://ci.appveyor.com/api/projects/status/4qbyuoo6kvxab4b5?svg=true\n[appveyor-url]: https://ci.appveyor.com/project/Leelow/clean-directory\n[codacy-coverage-image]: https://api.codacy.com/project/badge/Coverage/225159e9829d472f84fdacbceaaf5db5\n[codacy-coverage-url]: https://www.codacy.com/app/Leelow/clean-directory?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=Leelow/clean-directory\u0026utm_campaign=Badge_Coverage\n[codacy-grade-image]: https://api.codacy.com/project/badge/Grade/225159e9829d472f84fdacbceaaf5db5\n[codacy-grade-url]: https://www.codacy.com/app/Leelow/clean-directory?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=Leelow/clean-directory\u0026amp;utm_campaign=Badge_Grade\n[dependencies-image]: https://david-dm.org/leelow/sha512sum/status.svg\n[dependencies-url]: https://david-dm.org/leelow/sha512sum?type=dev\n[dev-dependencies-image]: https://david-dm.org/leelow/clean-directory/dev-status.svg\n[dev-dependencies-url]: https://david-dm.org/leelow/clean-directory?type=dev\n[javascript-standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n[javascript-standard-url]: http://standardjs.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleelow%2Fclean-directory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleelow%2Fclean-directory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleelow%2Fclean-directory/lists"}