{"id":29189414,"url":"https://github.com/coderaiser/node-jaguar","last_synced_at":"2025-07-01T23:07:36.884Z","repository":{"id":34487077,"uuid":"38426651","full_name":"coderaiser/node-jaguar","owner":"coderaiser","description":"🐆pack and extract .tar.gz archives with emitter","archived":false,"fork":false,"pushed_at":"2020-02-26T12:21:36.000Z","size":96,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-17T18:49:00.370Z","etag":null,"topics":["emitter","extractor","gzip","gzip-format","nodejs","packer","tar","tar-archive","tarball"],"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/coderaiser.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","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":"2015-07-02T10:31:29.000Z","updated_at":"2020-07-22T13:10:40.000Z","dependencies_parsed_at":"2022-09-11T19:32:59.281Z","dependency_job_id":null,"html_url":"https://github.com/coderaiser/node-jaguar","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/coderaiser/node-jaguar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fnode-jaguar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fnode-jaguar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fnode-jaguar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fnode-jaguar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderaiser","download_url":"https://codeload.github.com/coderaiser/node-jaguar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fnode-jaguar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261064738,"owners_count":23104732,"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":["emitter","extractor","gzip","gzip-format","nodejs","packer","tar","tar-archive","tarball"],"created_at":"2025-07-01T23:07:36.279Z","updated_at":"2025-07-01T23:07:36.861Z","avatar_url":"https://github.com/coderaiser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jaguar [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]\n\nPack and extract .tar.gz archives with emitter.\n\n## Global\n\n`Jaguar` could be installed global with\n\n```\nnpm i jaguar -g\n```\n\nAnd used this way:\n\n```\nUsage: jaguar [filename]\nOptions:\n  -h, --help      display this help and exit\n  -v, --version   output version information and exit\n  -p, --pack      pack files to archive\n  -x, --extract   extract files from archive\n```\n\n## Local\n\n`Jaguar` could be used localy. It will emit event on every packed/extracted file.\nGood for making progress bars.\n\n### Install\n\n```\nnpm i jaguar --save\n```\n\n### How to use?\n\n#### pack(from, to, names)\n\n- `from`  - **string** directory that would be packed\n- `to`    - **string** or **stream**, name of archive\n- `names` - **array** of names in directory `from` that would be packed.\n\n```js\nconst jaguar = require('jaguar');\nconst path = require('path');\nconst cwd = process.cwd();\nconst name = 'pipe.tar.gz';\nconst from = cwd + '/pipe-io';\nconst to = path.join(cwd, name);\n\nconst pack = jaguar.pack(from, to, [\n    'LICENSE',\n    'README.md',\n    'package.json'\n]);\n\npack.on('file', (name) =\u003e {\n    console.log(name);\n});\n\npack.on('start', () =\u003e {\n    console.log('start of packing');\n});\n\npack.on('progress', (percent) =\u003e {\n    console.log(percent + '%');\n});\n\npack.on('error', (error) =\u003e {\n    console.error(error);\n});\n\npack.on('end', () =\u003e {\n    console.log('done');\n});\n```\n\n#### extract(from, to)\n\n- `from` - path to **.tar.gz** archive\n- `to` - path to directory where files would be stored.\n\n```js\nconst jaguar = require('jaguar');\nconst path = require('path');\nconst cwd = process.cwd();\nconst name = 'pipe.tar.gz';\nconst to = cwd + '/pipe-io';\nconst from = path.join(cwd, name);\n\nconst extract = jaguar.extract(from, to);\n\nextract.on('file', (name) =\u003e {\n    console.log(name);\n});\n\nextract.on('progress', (percent) =\u003e {\n    console.log(percent + '%');\n});\n\nextract.on('error', (error) =\u003e {\n    console.error(error);\n});\n\nextract.on('end', () =\u003e {\n    console.log('done');\n});\n```\n\n\nIn case of starting example output should be similar to:\n\n```\n33%\n67%\n100%\ndone\n```\n\n## Related\n\n- [Bizzy](https://github.com/coderaiser/node-bizzy \"Bizzy\") - Pack and extract .tar.bz2 archives with emitter.\n- [Jag](https://github.com/coderaiser/node-jag \"Jag\") - Pack files and folders with tar and gzip.\n- [OneZip](https://github.com/coderaiser/node-onezip \"OneZip\") - Pack and extract zip archives with emitter.\n- [Tar-to-zip](https://github.com/coderaiser/node-tar-to-zip \"tar-to-zip\") - Convert tar and tar.gz archives to zip.\n- [Copymitter](https://github.com/coderaiser/node-copymitter \"Copymitter\") - Copy files with emitter.\n- [Remy](https://github.com/coderaiser/node-remy \"Remy\") - Remove files with emitter.\n\n## License\n\nMIT\n\n[NPMIMGURL]:                https://img.shields.io/npm/v/jaguar.svg?style=flat\n[BuildStatusIMGURL]:        https://img.shields.io/travis/coderaiser/node-jaguar/master.svg?style=flat\n[DependencyStatusIMGURL]:   https://img.shields.io/david/coderaiser/node-jaguar.svg?style=flat\n[LicenseIMGURL]:            https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat\n[NPMURL]:                   https://npmjs.org/package/jaguar \"npm\"\n[BuildStatusURL]:           https://travis-ci.org/coderaiser/node-jaguar  \"Build Status\"\n[DependencyStatusURL]:      https://david-dm.org/coderaiser/node-jaguar \"Dependency Status\"\n[LicenseURL]:               https://tldrlegal.com/license/mit-license \"MIT License\"\n\n[CoverageURL]:              https://coveralls.io/github/coderaiser/node-jaguar?branch=master\n[CoverageIMGURL]:           https://coveralls.io/repos/coderaiser/node-jaguar/badge.svg?branch=master\u0026service=github\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderaiser%2Fnode-jaguar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderaiser%2Fnode-jaguar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderaiser%2Fnode-jaguar/lists"}