lib/gcli/util/fileparser.js
function(context, typed, options) {
  var matches = options.matches == null ? undefined : options.matches.source;

  var connector = context.system.connectors.get();
  return GcliFront.create(connector).then(function(front) {
    return front.parseFile(typed, options.filetype,
      options.existing, matches).then(function(reply) {
        reply.status = Status.fromString(reply.status);
        if (reply.predictions != null) {
          reply.predictor = function() {
            return Promise.resolve(reply.predictions);
          };
        }
        front.connection.disconnect().catch(util.errorHandler);
        return reply;
      });
  });
}
function(context, typed, options) {
  var matches = options.matches == null ? undefined : options.matches.source;

  var connector = context.system.connectors.get();
  return GcliFront.create(connector).then(function(front) {
    return front.parseFile(typed, options.filetype,
      options.existing, matches).then(function(reply) {
        reply.status = Status.fromString(reply.status);
        if (reply.predictions != null) {
          reply.predictor = function() {
            return Promise.resolve(reply.predictions);
          };
        }
        front.connection.disconnect().catch(util.errorHandler);
        return reply;
      });
  });
}
function ( context , typed , options ) { var matches = options . matches == null ? undefined : options . matches . source ; var connector = context . system . connectors . get ( ) ; return GcliFront . create ( connector ) . then ( function ( front ) { return front . parseFile ( typed , options . filetype , options . existing , matches ) . then ( function ( reply ) { reply . status = Status . fromString ( reply . status ) ; if ( reply . predictions != null ) { reply . predictor = function ( ) { return Promise . resolve ( reply . predictions ) ; } ; } front . connection . disconnect ( ) . catch ( util . errorHandler ) ; return reply ; } ) ; } ) ; }
Implementation of parse for the web
Implementation of parse for the web