Closed peacechen closed 5 years ago
There is a node port using commonjs: https://github.com/getify/JSON.minify/tree/node
And there's a standard .js file port for use in browsers: https://github.com/getify/JSON.minify/tree/javascript
Not sure of there being a benefit to a single UMD format when both those already exist.
That should do the job. It would reduce maintenance to publish one package that can run on Node, browser module, or script injection (plus AMD). Fewer merges to the multiple branches that aren't really necessary when the core code is identical.
It would be great for this library to use UMD, allowing support for Node, browser and script injection. For example, I'd like to use it in code like this: