Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.15 KB

construct.md

File metadata and controls

30 lines (21 loc) · 1.15 KB

__construct()

Called when a new jslite object is created.

$doc = new \hexydec\jslite\jslite($config);

Arguments

$config

A optional array of configuration options that will be merged recursively with the default configuration. The available options and their defaults are:

minify

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 undefined to void 0 Boolean true
numbers Remove underscores from numbers Boolean true

Returns

A new JSlite object.