{"id":17415250,"url":"https://github.com/tomjs/unzip-crx","last_synced_at":"2025-04-15T21:42:41.387Z","repository":{"id":209853072,"uuid":"725124171","full_name":"tomjs/unzip-crx","owner":"tomjs","description":"解压 Chrome 插件文件(*.crx)。unzip chrome extension files(*.crx).","archived":false,"fork":false,"pushed_at":"2024-07-12T13:12:39.000Z","size":486,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T01:41:28.901Z","etag":null,"topics":["chorme","chrome-extension","crx","extension","unzip"],"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/tomjs.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":"2023-11-29T13:44:18.000Z","updated_at":"2025-01-08T09:55:32.000Z","dependencies_parsed_at":"2023-11-29T14:01:07.945Z","dependency_job_id":"af4031ff-b86c-438b-967d-425881a827e0","html_url":"https://github.com/tomjs/unzip-crx","commit_stats":null,"previous_names":["tomgao365/unzip-crx","tomjs/unzip-crx"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomjs%2Funzip-crx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomjs%2Funzip-crx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomjs%2Funzip-crx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomjs%2Funzip-crx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomjs","download_url":"https://codeload.github.com/tomjs/unzip-crx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248500603,"owners_count":21114512,"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":["chorme","chrome-extension","crx","extension","unzip"],"created_at":"2024-10-17T01:08:45.173Z","updated_at":"2025-04-15T21:42:41.334Z","avatar_url":"https://github.com/tomjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @tomjs/unzip-crx\n\n[![npm](https://img.shields.io/npm/v/@tomjs/unzip-crx)](https://www.npmjs.com/package/@tomjs/unzip-crx) ![node-current (scoped)](https://img.shields.io/node/v/@tomjs/unzip-crx) ![NPM](https://img.shields.io/npm/l/@tomjs/unzip-crx) [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@tomjs/unzip-crx)\n\n**English** | [中文](./README.zh_CN.md)\n\n\u003e Unzip chrome extension files\n\nIf you want to unzip [Chrome extension files](https://developer.chrome.com/extensions) (\\*.crx) you might have the problem that your unzip lib claims that the file header is malformed. This is due to that Chrome [adds some extra information](https://developer.chrome.com/extensions/crx) for identifying crx files. `unzip-crx` handles those additional headers and unzips as usual.\n\nThis library is based on [Peerigon](https://github.com/peerigon)'s [unzip-crx](https://github.com/peerigon/unzip-crx), which makes simple modifications and adds `esm` and `cjs` support.\n\nAnd this [unzip-crx](https://github.com/peerigon/unzip-crx) is highly inspired by [crx2ff](https://github.com/abarreir/crx2ff) from [abarreir](https://github.com/abarreir) and [crxviewer](https://github.com/Rob--W/crxviewer) from [Rob Wu](https://github.com/Rob--W), thanks!\n\n## Install\n\n```bash\n# pnpm\npnpm add @tomjs/unzip-crx\n\n# yarn\nyarn add @tomjs/unzip-crx\n\n# npm\nnpm add @tomjs/unzip-crx\n```\n\n## Example\n\n- `esm`\n\n```js\nimport unzip from 'unzip-crx';\n\nconst crxFile = './this-chrome-extension.crx';\n\nunzip(crxFile).then(() =\u003e {\n  console.log('Successfully unzipped your crx file..');\n});\n```\n\n- `cjs`\n\n```js\nconst unzip = require('unzip-crx');\n\nconst crxFile = './this-chrome-extension.crx';\n\nunzip(crxFile).then(() =\u003e {\n  console.log('Successfully unzipped your crx file..');\n});\n```\n\n## Documentation\n\n- [API Document](https://www.jsdocs.io/package/@tomjs/unzip-crx) provided by [jsdocs.io](https://www.jsdocs.io).\n- [index.d.ts](https://www.unpkg.com/browse/@tomjs/unzip-crx/dist/index.d.ts) provided by [unpkg.com](https://www.unpkg.com).\n\n## API\n\n### unzip(file[, destination])\n\n- `file`: string, the path to the file to unzip\n- `destination`: string, the path to the destination folder (optional)\n\nResolves with a Promise if the file was unzipped successfully, throws otherwise (use `.catch()`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomjs%2Funzip-crx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomjs%2Funzip-crx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomjs%2Funzip-crx/lists"}