code: function hashJsonSync(data, algorithm) {
      var hash = crypto.createHash(algorithm);
      (function feed(val) {
          var keys = _.keys(val).sort();
          if (keys.length) {
              hash.update(JSON.stringify(keys), 'utf8');
              _.forEach(keys, function (key) {
                  var value = val[key];
                  if (!_.isUndefined(value)) {
                      if (!_.isObject(value)) {
                          hash.update(JSON.stringify(value), 'utf8');
                      }
                      else {
                          feed(value);
                      }
                  }
              });
          }
      })(JSON.parse(JSON.stringify(data)));
      return hash.digest();
  }
docs: computes a hash of some JSON object synchronously.
  
  Prefer the async variant if possible.
  
  @param data to hash.
  @param algorithm of choice.
  @return hash value.
  
  @internal Not part of public API, exported for library use only.