lib/tags/if.js
function createIfCondition(condition, strict) {
  var compiled;
  if(strict) {
    compiled = 'if(' + condition + ')';
  } else {
    compiled = 'try {' +
                 '__tmp = ' + condition +
               '} catch(__err) {' +
                 'if(__err instanceof ReferenceError) {' +
                   '__tmp = false;' +
                 '} else {' +
                   'throw __err;' +
                 '}' +
               '}' +
               'if(__tmp)';
  }
  return compiled;
}
function createIfCondition(condition, strict) {
  var compiled;
  if(strict) {
    compiled = 'if(' + condition + ')';
  } else {
    compiled = 'try {' +
                 '__tmp = ' + condition +
               '} catch(__err) {' +
                 'if(__err instanceof ReferenceError) {' +
                   '__tmp = false;' +
                 '} else {' +
                   'throw __err;' +
                 '}' +
               '}' +
               'if(__tmp)';
  }
  return compiled;
}
function createIfCondition ( condition , strict ) { var compiled ; if ( strict ) { compiled = 'if(' + condition + ')' ; } else { compiled = 'try {' + '__tmp = ' + condition + '} catch(__err) {' + 'if(__err instanceof ReferenceError) {' + '__tmp = false;' + '} else {' + 'throw __err;' + '}' + '}' + 'if(__tmp)' ; } return compiled ; }
Global functions
 
Outputs `if` clause based on `condition`. If not `strict`,
actual test will be wrapped in a `try…catch` statement to catch
ReferenceErrors silently

@param {String} condition
@param {Boolean} strict
@return {String}
@api private
Global functions Outputs if clause based on condition . If not strict actual test will be wrapped in a try…catch statement to catch ReferenceErrors silently