{"id":21667245,"url":"https://github.com/luftywiranda13/force-del","last_synced_at":"2025-04-12T01:32:33.003Z","repository":{"id":57240031,"uuid":"117116782","full_name":"luftywiranda13/force-del","owner":"luftywiranda13","description":"Force delete files or folders using globs","archived":false,"fork":false,"pushed_at":"2020-06-03T09:19:11.000Z","size":136,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T21:12:52.419Z","etag":null,"topics":["clean","concurrency","del","delete","destroy","dir","directory","file","files","folder","glob-pattern","parallel","remove","rimraf","trash"],"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/luftywiranda13.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-01-11T15:12:51.000Z","updated_at":"2019-05-04T06:22:06.000Z","dependencies_parsed_at":"2022-09-05T07:51:14.113Z","dependency_job_id":null,"html_url":"https://github.com/luftywiranda13/force-del","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luftywiranda13%2Fforce-del","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luftywiranda13%2Fforce-del/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luftywiranda13%2Fforce-del/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luftywiranda13%2Fforce-del/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luftywiranda13","download_url":"https://codeload.github.com/luftywiranda13/force-del/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248504252,"owners_count":21115139,"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","concurrency","del","delete","destroy","dir","directory","file","files","folder","glob-pattern","parallel","remove","rimraf","trash"],"created_at":"2024-11-25T11:35:32.059Z","updated_at":"2025-04-12T01:32:32.973Z","avatar_url":"https://github.com/luftywiranda13.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# force-del\n\n\u003e Force delete files or folders using [globs](https://github.com/isaacs/minimatch#usage)\n\n[![Package Version](https://img.shields.io/npm/v/force-del.svg?style=flat-square)](https://www.npmjs.com/package/force-del)\n[![Downloads Status](https://img.shields.io/npm/dm/force-del.svg?style=flat-square)](https://npm-stat.com/charts.html?package=force-del\u0026from=2016-04-01)\n[![Build Status: Linux](https://img.shields.io/travis/luftywiranda13/force-del/master.svg?style=flat-square)](https://travis-ci.org/luftywiranda13/force-del)\n[![Coverage Status](https://img.shields.io/codecov/c/github/luftywiranda13/force-del/master.svg?style=flat-square)](https://codecov.io/gh/luftywiranda13/force-del)\n\nIf the matching files or folders are managed by `git`, theyʼll be deleted and marked as `deleted` in staging area. Otherwise, theyʼll be deleted permanently (not to the trash).\n\n## How does it work?\n\n* Filters the files that should be deleted by using [globby](https://github.com/sindresorhus/globby)\n* Maps the matching paths _one-by-one_ to be included in `git rm -rf` command\n* Uses [rimraf](https://github.com/isaacs/rimraf) if the matching item isnʼt managed by `git`\n* These processes run concurrently\n\n## Installation\n\n```sh\nnpm install force-del\n```\n\n## Usage\n\n```js\nconst forceDel = require('force-del');\n\nforceDel(['**/*.{gif,jpg}', 'oops/vids/*.3gp']).then(paths =\u003e {\n  console.log('Deleted:\\n', paths.join('\\n'));\n});\n```\n\n## API\n\n### forceDel(patterns, [options])\n\nReturns `Promise\u003cArray\u003e` of deleted paths.\n\n#### patterns\n\nType: `string` | `string[]`\n\nSee supported minimatch [patterns](https://github.com/isaacs/minimatch#usage).\n\n* [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test/test.js)\n* [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)\n\n#### options\n\nType: `Object`\n\n##### concurrency\n\nType: `number`\u003cbr\u003e\nDefault: `Infinity`\u003cbr\u003e\nMinimum: `1`\n\nConcurrency limit.\n\n##### cwd\n\nType: `string`\u003cbr /\u003e\nDefault: `process.cwd()`\n\nCurrent working directory.\n\n##### onlyFiles\n\nType: `boolean`\u003cbr /\u003e\nDefault: `false`\n\nSet to `true` to match files only.\n\nOther options are derived from the defaults of these libraries:\n\n* [globby](https://github.com/sindresorhus/globby#options)\n* [node-glob](https://github.com/isaacs/node-glob#options)\n* [execa](https://github.com/sindresorhus/execa/#options)\n\n## Related\n\n* [force-del-cli](https://github.com/luftywiranda13/force-del-cli) － CLI for this module\n* [remove-lockfiles](https://github.com/luftywiranda13/remove-lockfiles) － Prevent committing lockfiles\n\n## License\n\nMIT \u0026copy; [Lufty Wiranda](https://www.luftywiranda.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluftywiranda13%2Fforce-del","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluftywiranda13%2Fforce-del","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluftywiranda13%2Fforce-del/lists"}