tools/clusterfuzz/js_fuzzer/db.js
/**
 * Returns true if an expression can be applied or false otherwise.
 */
Returns true if an expression can be applied or false otherwise.
Returns true if an expression can be applied or false otherwise .
function isValid(expression) {
  const expressionTemplate = babelTemplate(
      expression.source,
      sourceHelpers.BABYLON_REPLACE_VAR_OPTIONS);
  const dependencies = {};
  if (expression.dependencies) {
    for (const dependency of expression.dependencies) {
      dependencies[dependency] = babelTypes.identifier('__v_0');
    }
  }
  try {
    expressionTemplate(dependencies);
  } catch (e) {
    return false;
  }
  return true;
}
function isValid ( expression ) { const expressionTemplate = babelTemplate ( expression . source , sourceHelpers . BABYLON_REPLACE_VAR_OPTIONS ) ; const dependencies = { } ; if ( expression . dependencies ) { for ( const dependency of expression . dependencies ) { dependencies [ dependency ] = babelTypes . identifier ( '__v_0' ) ; } } try { expressionTemplate ( dependencies ) ; } catch ( e ) { return false ; } return true ; }
Returns true if an expression can be applied or false otherwise.
Returns true if an expression can be applied or false otherwise .