PHPackages                             tedivm/jshrink - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tedivm/jshrink

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tedivm/jshrink
==============

Javascript Minifier built in PHP

v1.8.1(5mo ago)76037.7M—0.3%146[13 issues](https://github.com/tedious/JShrink/issues)[1 PRs](https://github.com/tedious/JShrink/pulls)20BSD-3-ClausePHPPHP ^7.0|^8.0CI failing

Since Nov 26Pushed 5mo ago38 watchersCompare

[ Source](https://github.com/tedious/JShrink)[ Packagist](https://packagist.org/packages/tedivm/jshrink)[ Docs](http://github.com/tedious/JShrink)[ GitHub Sponsors](https://github.com/tedivm)[ Fund](https://tidelift.com/funding/github/packagist/tedivm/jshrink)[ RSS](/packages/tedivm-jshrink/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (25)Used By (20)

JShrink [![Build Status](https://camo.githubusercontent.com/b2e4c57793e074644ae3d150551d5b3c64c2ceb8f39be6b385b2f209536ca3a8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746564696f75732f6a736872696e6b2f70725f74657374732e796d6c3f6272616e63683d6d6173746572)](https://github.com/tedious/JShrink/actions/workflows/pr_tests.yml)
==================================================================================================================================================================================================================================================================================================================================================================================================

[](#jshrink-)

[![License](https://camo.githubusercontent.com/a9ae010b449f731adf00d0561ccb5afe12b927a5ec7fcfafe8e35c9270bbc904/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f74656469766d2f4a536872696e6b2e737667)](https://github.com/tedivm/JShrink/blob/master/LICENSE)[![Latest Stable Version](https://camo.githubusercontent.com/3c34e938ffcfd1a8a7ed3e7d58ffb9663d06f18daa64c59f0aa6ee95e4443846/687474703a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f746564696f75732f4a536872696e6b2e737667)](https://packagist.org/packages/tedivm/JShrink)[![Coverage Status](https://camo.githubusercontent.com/16c7079dbd29e0bf1d567c8ddbeb5b4fde772c2ebb65e0a7836816e338bb8db5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f746564696f75732f4a536872696e6b2f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/tedivm/JShrink?branch=master)[![Total Downloads](https://camo.githubusercontent.com/380d19f22834b17e2b25fbb6778e57183e9a2a107dd8dc540bd3a60daba91400/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74656469766d2f6a736872696e6b2e737667)](https://packagist.org/packages/tedivm/JShrink)

JShrink is a php class that minifies javascript so that it can be delivered to the client quicker. This code can be used by any product looking to minify their javascript on the fly (although caching the results is suggested for performance reasons). Unlike many other products this is not a port into php but a native application, resulting in better performance.

Usage
-----

[](#usage)

Minifying your code is simple call to a static function-

```
