{"id":18285952,"url":"https://github.com/exodusmovement/zip-up","last_synced_at":"2025-04-05T08:30:46.394Z","repository":{"id":32405426,"uuid":"131754168","full_name":"ExodusMovement/zip-up","owner":"ExodusMovement","description":"Simple zip module","archived":false,"fork":false,"pushed_at":"2023-07-19T10:45:21.000Z","size":250,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-04-14T13:10:04.172Z","etag":null,"topics":[],"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/ExodusMovement.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-05-01T19:27:27.000Z","updated_at":"2022-03-14T06:36:30.000Z","dependencies_parsed_at":"2023-01-14T21:07:26.392Z","dependency_job_id":null,"html_url":"https://github.com/ExodusMovement/zip-up","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fzip-up","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fzip-up/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fzip-up/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fzip-up/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExodusMovement","download_url":"https://codeload.github.com/ExodusMovement/zip-up/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223174744,"owners_count":17100272,"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":"2024-11-05T13:18:19.484Z","updated_at":"2024-11-05T13:18:20.142Z","avatar_url":"https://github.com/ExodusMovement.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zip-up\n\nSimple zip module for Node.js\n\n## Introduction\n\nI created this project because there isn't a simple, easy to use zip reader for\nNodeJS which has few dependencies and simple in implementation. When searching\nfor such a project, I came across this one:\n\nhttps://www.npmjs.com/package/node-stream-zip\n\nHowever, it is no longer supported, and the tip is broken. I wanted to be able\nto use Node's built in zlib support, and the author had already done the\nlegwork. He also had code which output correct zip headers. All I had to do is\nmake sure the file itself streams properly to the output file in question using\nNode streams. I hope it proves as useful to you as it did to me!\n\nWhat was needed was the ability to add multiple files and directories into a\nsingle zip file without having to have a staging folder on the harddrive. Yes,\nthis means everything is done in memory, so be mindful of file sizes and the\navailable RAM on the target machine.\n\n## Installation\n\n```bash\n$ npm install zip-up\n```\n\n## Usage\n\n```js\nimport Zip from 'zip-up'\nconst zipper = new Zip('output.zip', { level: 1 })\nawait zipper.addDir('directory/to/zip')\nawait zipper.addDir('other/directory/to/zip')\nconst bytesWritten = await zipper.finalize()\n// bytesWritten -\u003e 276\n```\n\n# Options\n\nOptions can be passed as the second argument to `Zip.addDir()`:\n\n```js\nawait zipper.addDir('directory', {\n  ignoreHidden: true,\n  exclude: ['/tmp/']\n})\n```\n\n`ignoreHidden`: whether to ignore hidden files; i.e. files beginning with `.` (default: `false`).\n\n`exclude`: array of paths to exclude (default: `[]`) **Note**: this applies to\nfiles as well as directories.\n\n## Testing\n\nRun `npm test` to run the test suite. The tests insure that no errors occur and\nalso verifies that the file is created correctly by unzipping and examining the\nfile contents.\n\n## Contributing\n\nWhen submitting a PR for review, make sure that you include a test for your proposed\nfeature or fix.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodusmovement%2Fzip-up","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexodusmovement%2Fzip-up","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodusmovement%2Fzip-up/lists"}