Skip to content

Commit 6df3cb8

Browse files
committed
add CDN usage, dev-source tip
The `latest` in the URL is an API flag that will autograb the newest version; will help bumping versions ;)
1 parent 500fc85 commit 6df3cb8

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

README.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,18 @@ Then in code:
3939
JSON.minify = JSON.minify || require("node-json-minify");
4040

4141
var myjson = JSON.minify( '{ /* comment */ "foo": 42 \n }' ); // {"foo":42}
42+
43+
----------
44+
45+
For in-browser use, you may download from the jsDelivr CDN:
46+
<script src='//cdn.jsdelivr.net/json-minify/latest/minify.json.min.js'></script>
47+
or to use Kit's fork:
48+
<script src='//cdn.jsdelivr.net/json-minify/latest/minify-sans-regexp.min.js'></script>
4249
----------
4350

4451
NOTE: As transmitting bloated (ie, with comments/whitespace) JSON would be wasteful
45-
and silly, this JSON.minify() is intended for use in server-side processing
52+
and silly, this JSON.minify() is intended for: server-side processing
4653
environments where you can strip comments/whitespace from JSON before parsing
4754
a JSON document, or before transmitting such over-the-wire from server to browser.
55+
Also helpful during development, where your source is formmated & commented,
56+
then deploy a minified version.

0 commit comments

Comments
 (0)