parseKeyValuePair()

in source/checksum/lib/restore/index.js [128:147]


  parseKeyValuePair(str) {
    const pair = {};
    let current = str;

    while (current) {
      const result = this.reverseLookup(current);
      if (result) {
        const {
          key,
          value,
          next,
        } = result;
        pair[key] = value;
        current = next;
      } else {
        current = undefined;
      }
    }
    return pair;
  }