src/observations.js
function(expression, options) {
    if (options && options.isSetter) {
      return expressions.parseSetter(expression, this.globals, this.formatters, options.extraArgs);
    } else if (options && options.extraArgs) {
      var allArgs = [expression, this.globals, this.formatters].concat(options.extraArgs);
      return expressions.parse.apply(expressions, allArgs);
    } else {
      return expressions.parse(expression, this.globals, this.formatters);
    }
  }
function(expression, options) {
    if (options && options.isSetter) {
      return expressions.parseSetter(expression, this.globals, this.formatters, options.extraArgs);
    } else if (options && options.extraArgs) {
      var allArgs = [expression, this.globals, this.formatters].concat(options.extraArgs);
      return expressions.parse.apply(expressions, allArgs);
    } else {
      return expressions.parse(expression, this.globals, this.formatters);
    }
  }
function ( expression , options ) { if ( options && options . isSetter ) { return expressions . parseSetter ( expression , this . globals , this . formatters , options . extraArgs ) ; } else if ( options && options . extraArgs ) { var allArgs = [ expression , this . globals , this . formatters ] . concat ( options . extraArgs ) ; return expressions . parse . apply ( expressions , allArgs ) ; } else { return expressions . parse ( expression , this . globals , this . formatters ) ; } }
Parses an expression into a function using the globals and formatters objects associated with this instance of
observations.
@param {String} expression The expression string to parse into a function
@param {Object} options Additional options to pass to the parser.
`{ isSetter: true }` will make this expression a setter that accepts a value.
`{ extraArgs: [ 'argName' ]` will make extra arguments to pass in to the function.
@return {Function} A function that may be called to execute the expression (call it against a context using=
`func.call(context)` in order to get the data from the context correct)
Parses an expression into a function using the globals and formatters objects associated with this instance of observations .