{"id":15389086,"url":"https://github.com/splitbrain/php-jsstrip","last_synced_at":"2026-03-08T04:31:27.174Z","repository":{"id":142103193,"uuid":"612737312","full_name":"splitbrain/php-jsstrip","owner":"splitbrain","description":"PHP based JavaScript compressor","archived":false,"fork":false,"pushed_at":"2023-03-12T10:23:51.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-02T18:43:40.563Z","etag":null,"topics":["compressor","javascript-minifier","minify","php","php-library"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/splitbrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"splitbrain"}},"created_at":"2023-03-11T20:33:04.000Z","updated_at":"2023-03-12T18:30:56.000Z","dependencies_parsed_at":"2023-07-17T17:58:10.705Z","dependency_job_id":null,"html_url":"https://github.com/splitbrain/php-jsstrip","commit_stats":{"total_commits":23,"total_committers":8,"mean_commits":2.875,"dds":"0.34782608695652173","last_synced_commit":"21254b19b381a25d6f3dd89dbd5c8191373a4d69"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/splitbrain/php-jsstrip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Fphp-jsstrip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Fphp-jsstrip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Fphp-jsstrip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Fphp-jsstrip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splitbrain","download_url":"https://codeload.github.com/splitbrain/php-jsstrip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Fphp-jsstrip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30245213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["compressor","javascript-minifier","minify","php","php-library"],"created_at":"2024-10-01T14:59:24.616Z","updated_at":"2026-03-08T04:31:27.131Z","avatar_url":"https://github.com/splitbrain.png","language":"PHP","readme":"# PHP JSStrip\n\nThis is a PHP port of Nick Galbreath's python tool [jsstrip.py](https://code.google.com/p/jsstrip/).\n\nIt was originally ported to PHP in 2006 as part of the [DokuWiki](http://www.dokuwiki.org) wiki engine. It has received several improvements over the years and is now available as a standalone library.\n\nQuoting the original description:\n\njsstrip is a open-source library to remove whitespace and comments from a javascript file. You might want to do this to optimize size and performance, or to make a file harder to read. It typically makes 30-40% savings in file size.\n\n**WARNING**\n\njsstrip is not a true javascript parser. It assumes you have properly delimited the 'end of line' using a ';' (semicolon).\n\n  * Yes `print 'foo'; print 'bar';`\n  * No `print 'foo' print 'bar'`\n\nYou'll have to convert your code to use ';' first.\n\nALWAYS test the stripped version before deploying to production.\n\n\n## Installation\n\nInstall via composer\n\n    composer require splitbrain/php-jsstrip\n\n## Usage\n\n```php\n\u003c?php\n\nrequire_once 'vendor/autoload.php';\n\n$js = file_get_contents('somefile.js'); // gather your JS here somehow\n\n$minifiedJS = (new \\splitbrain\\JSStrip\\JSStrip())-\u003ecompress($js);\n```\n\n## Skip Minification\n\nYou can skip Minification for parts of your code by surrounding it by special comments:\n\n```js\n/* BEGIN NOCOMPRESS */\nconst foo = 'No compression here'; // this comment will also stay\n/* END NOCOMPRESS */\n```\n","funding_links":["https://github.com/sponsors/splitbrain"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitbrain%2Fphp-jsstrip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplitbrain%2Fphp-jsstrip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitbrain%2Fphp-jsstrip/lists"}