LightnCandy option: FLAG_JSTRUE

Align boolean conversion logic with JavaScript.

Sample Codes

The default behavior: true converts to 1, false converts to empty string.

Data:
array(
  "foo" => true,
  "bar" => false
)
Template:
{{foo}}, {{bar}}
Result:
1, 
Source Code
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "{{foo}}, {{bar}}";

$php = LightnCandy::compile($template);
$render = LightnCandy::prepare($php);
$data = array(
  "foo" => true,
  "bar" => false
);
echo $render($data);

Same behavior with handlebars.js and mustache.js.

Used option: FLAG_JSTRUE

Data:
array(
  "foo" => true,
  "bar" => false
)
Template:
{{foo}}, {{bar}}
Result:
true, false
Source Code
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "{{foo}}, {{bar}}";

$php = LightnCandy::compile($template, array(
  "flags" => LightnCandy::FLAG_JSTRUE
));
$render = LightnCandy::prepare($php);
$data = array(
  "foo" => true,
  "bar" => false
);
echo $render($data);