dist/autocomplete.js
function getMatch(ctx, data, options) {
  // Look for a command match, eliminating and then
  // re-introducing leading spaces.
  var len = ctx.length;
  var trimmed = ctx.replace(/^\s+/g, '');
  var match = autocomplete.match(trimmed, data.slice(), options);
  if (_.isArray(match)) {
    return match;
  }
  var prefix = new Array(len - trimmed.length + 1).join(' ');
  // If we get an autocomplete match on a command, finish it.
  if (match) {
    // Put the leading spaces back in.
    match = prefix + match;
    return match;
  }
  return undefined;
}
function getMatch(ctx, data, options) {
  // Look for a command match, eliminating and then
  // re-introducing leading spaces.
  var len = ctx.length;
  var trimmed = ctx.replace(/^\s+/g, '');
  var match = autocomplete.match(trimmed, data.slice(), options);
  if (_.isArray(match)) {
    return match;
  }
  var prefix = new Array(len - trimmed.length + 1).join(' ');
  // If we get an autocomplete match on a command, finish it.
  if (match) {
    // Put the leading spaces back in.
    match = prefix + match;
    return match;
  }
  return undefined;
}
function getMatch ( ctx , data , options ) { // Look for a command match, eliminating and then // re-introducing leading spaces. var len = ctx . length ; var trimmed = ctx . replace ( / ^\s+ / g , '' ) ; var match = autocomplete . match ( trimmed , data . slice ( ) , options ) ; if ( _ . isArray ( match ) ) { return match ; } var prefix = new Array ( len - trimmed . length + 1 ) . join ( ' ' ) ; // If we get an autocomplete match on a command, finish it. if ( match ) { // Put the leading spaces back in. match = prefix + match ; return match ; } return undefined ; }
Looks for a potential exact match
based on given data.

@param {String} ctx
@param {Array} data
@return {String}
@api private
Looks for a potential exact match based on given data .