code: function objectToMap(obj, path, map) {
    path = path ? path + '/' : '';
    map = map || {};
    for (let key of Object.keys(obj)) {
      let p = path + key;
      let value = obj[key];
      if (typeof value === 'object') {
        objectToMap(value, p, map);
      } else {
        map[p] = value;
      }
    }
    return map;
  }
docs: /* eslint no-empty:0