Called when a new jslite object is created.
$doc = new \hexydec\jslite\jslite($config);
A optional array of configuration options that will be merged recursively with the default configuration. The available options and their defaults are:
An array of minification defaults. It is recommended that this is passed to the minify()
method instead.
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 undefine d to void 0 |
Boolean | true |
numbers | Remove underscores from numbers | Boolean | true |
A new JSlite object.