getPropertiesByPrefix = (obj, prefix, removePrefix) => {

  const r = makeHashMap();
  for (let p in obj) {
    if (startsWith(p, prefix)) {
      r[(removePrefix ? p.substr(prefix.length) : p)] = obj[p];
    }
  }

  return r;

}
Returns a new object that contains only properties that start with
a certain prefix. The prefix is optionally removed from the result.

@param {Object} obj
@param {string} prefix - The start sequence
@param {boolean} [removePrefix=false] - True if the prefix shall be removed
    from the resulting property name, false otherwise.
@result {object}