lib/java-properties.js
function processLine (instance, acc, line) {
  debug('processing: %s', line);
  // if previous line was continued then capture this line verbatim
  // of course we need to handle if this is also a continuation too
  if (instance.key) {
    var hasCont = hasNewlineContinuation(line);
    if (hasCont) {
      debug('removing line continuation');
      line = removeContinuation(line);
    }
    line = unescape(line);
    debug('saving %s=>%s', instance.key, line);
    acc[instance.key] += line;
    if (!hasCont) {
      instance.key = undefined;
    }
  } else {
    var kv = extractKeyValue(line);
    kv.key = unescape(kv.key);
    if (hasNewlineContinuation(kv.value)) {
      debug('removing line continuation');
      kv.value = removeContinuation(kv.value);
      instance.key = kv.key;
    }
    kv.value = unescape(kv.value);
    debug('saving %s=>%s', kv.key, kv.value);
    acc[kv.key] = kv.value;
  }
  return acc;
}
function processLine (instance, acc, line) {
  debug('processing: %s', line);
  // if previous line was continued then capture this line verbatim
  // of course we need to handle if this is also a continuation too
  if (instance.key) {
    var hasCont = hasNewlineContinuation(line);
    if (hasCont) {
      debug('removing line continuation');
      line = removeContinuation(line);
    }
    line = unescape(line);
    debug('saving %s=>%s', instance.key, line);
    acc[instance.key] += line;
    if (!hasCont) {
      instance.key = undefined;
    }
  } else {
    var kv = extractKeyValue(line);
    kv.key = unescape(kv.key);
    if (hasNewlineContinuation(kv.value)) {
      debug('removing line continuation');
      kv.value = removeContinuation(kv.value);
      instance.key = kv.key;
    }
    kv.value = unescape(kv.value);
    debug('saving %s=>%s', kv.key, kv.value);
    acc[kv.key] = kv.value;
  }
  return acc;
}
function processLine ( instance , acc , line ) { debug ( 'processing: %s' , line ) ; // if previous line was continued then capture this line verbatim // of course we need to handle if this is also a continuation too if ( instance . key ) { var hasCont = hasNewlineContinuation ( line ) ; if ( hasCont ) { debug ( 'removing line continuation' ) ; line = removeContinuation ( line ) ; } line = unescape ( line ) ; debug ( 'saving %s=>%s' , instance . key , line ) ; acc [ instance . key ] += line ; if ( ! hasCont ) { instance . key = undefined ; } } else { var kv = extractKeyValue ( line ) ; kv . key = unescape ( kv . key ) ; if ( hasNewlineContinuation ( kv . value ) ) { debug ( 'removing line continuation' ) ; kv . value = removeContinuation ( kv . value ) ; instance . key = kv . key ; } kv . value = unescape ( kv . value ) ; debug ( 'saving %s=>%s' , kv . key , kv . value ) ; acc [ kv . key ] = kv . value ; } return acc ; }
This method is called with each non-blank and non-comment
line from the properties file. It builds up the object
representation of the properties data in the accumulator.
It uses instance object to store state when lines are
being continued.

@param {Object} instance
@param {Object} acc
@param {string} line
@returns {Object}
This method is called with each non - blank and non - comment line from the properties file . It builds up the object representation of the properties data in the accumulator . It uses instance object to store state when lines are being continued .