function computeHash(input) {
  const hash = JSON.stringify(input)
    .split('')
    .reduce((prev, curr) => (prev << 5) - prev + curr.charCodeAt(0), 0);
  return (hash >>> 0).toString();
}
see https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript
@param {Object|string} input The hash input, either an object or string
@return {string} Hash (if the object cannot be serialized, it is based on `getUid`)