Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 936 Bytes

minify.md

File metadata and controls

28 lines (21 loc) · 936 Bytes

minify()

Minifies the currently loaded document.

$doc = new \hexydec\jslite\jslite();
if ($doc->load($js)) {
	$doc->minify($minify);
}

Arguments

$minify

An array of minification options:

key Description Type Default
whitespace Strip whitespace around javascript Boolean true
comments Strip comments Boolean true
semicolons Remove end of line semi-colons where possible Boolean true
quotestyle Convert quotes to the specified character, null not to convert ?String "
booleans Shorten booleans, true => !0 and false => !1 Boolean true
undefined Convert undefined to void 0 Boolean true
numbers Remove underscores from numbers Boolean true

Returns