function build(strategy, text) {
      if (typeof strategy.props.context === "function") {
        var context = strategy.props.context(text);
        if (typeof context === "string") {
          text = context;
        } else if (!context) {
          return null;
        }
      }
      var match = strategy.matchText(text);
      return match ? new Query(strategy, match[strategy.index], match) : null;
    }
/**
     * Build a Query object by the given string if this matches to the string.
     *
     * @param {string} text - Head to input cursor.
     */
Build a Query object by the given string if this matches to the string.
@param {string} text - Head to input cursor.
Build a Query object by the given string if this matches to the string . @param { string } text - Head to input cursor .
function build(strategy, text) {
      if (typeof strategy.props.context === "function") {
        var context = strategy.props.context(text);
        if (typeof context === "string") {
          text = context;
        } else if (!context) {
          return null;
        }
      }
      var match = strategy.matchText(text);
      return match ? new Query(strategy, match[strategy.index], match) : null;
    }
function build ( strategy , text ) { if ( typeof strategy . props . context === "function" ) { var context = strategy . props . context ( text ) ; if ( typeof context === "string" ) { text = context ; } else if ( ! context ) { return null ; } } var match = strategy . matchText ( text ) ; return match ? new Query ( strategy , match [ strategy . index ] , match ) : null ; }
Build a Query object by the given string if this matches to the string.
Build a Query object by the given string if this matches to the string .