lib/decoder.js
function parse(lines) {
  var i, line, key, parts, values;

  for(i = 0;i < lines.length;i++) {
    line = lines[i];
    this.lineNumber++;

    // ignore comments and whitespace lines
    if(COMMENT.test(line) || WHITESPACE.test(line)) {
      continue;
    // got something to parse
    }else{

      // strip empty entires, leading whitespace is allowed
      parts = line.split(/\s+/).filter(function(p) {
        return p;
      })

      // get the config key
      key = parts[0];

      // remaining parts to parse as values
      values = parts.slice(1);
      try {
        this.conf.add(key, values, this.lineNumber);
      }catch(e) {
        throw new ConfigError(this.lineNumber, line, this.file, e);
      }
    }
  }
}
function parse(lines) {
  var i, line, key, parts, values;

  for(i = 0;i < lines.length;i++) {
    line = lines[i];
    this.lineNumber++;

    // ignore comments and whitespace lines
    if(COMMENT.test(line) || WHITESPACE.test(line)) {
      continue;
    // got something to parse
    }else{

      // strip empty entires, leading whitespace is allowed
      parts = line.split(/\s+/).filter(function(p) {
        return p;
      })

      // get the config key
      key = parts[0];

      // remaining parts to parse as values
      values = parts.slice(1);
      try {
        this.conf.add(key, values, this.lineNumber);
      }catch(e) {
        throw new ConfigError(this.lineNumber, line, this.file, e);
      }
    }
  }
}
function parse ( lines ) { var i , line , key , parts , values ; for ( i = 0 ; i < lines . length ; i ++ ) { line = lines [ i ] ; this . lineNumber ++ ; // ignore comments and whitespace lines if ( COMMENT . test ( line ) || WHITESPACE . test ( line ) ) { continue ; // got something to parse } else { // strip empty entires, leading whitespace is allowed parts = line . split ( / \s+ / ) . filter ( function ( p ) { return p ; } ) // get the config key key = parts [ 0 ] ; // remaining parts to parse as values values = parts . slice ( 1 ) ; try { this . conf . add ( key , values , this . lineNumber ) ; } catch ( e ) { throw new ConfigError ( this . lineNumber , line , this . file , e ) ; } } } }
Synchronous line parser.
Synchronous line parser .