code: function hashObject(obj, opts) {
      opts = opts || {};
      var alg = opts.alg || defaults.alg;
      var enc = opts.enc || defaults.enc;
      var sorted = sortObject(obj);
  
      return crypto
        .createHash(alg)
        .update(sorted)
        .digest(enc);
    }
docs: Creates hash from given object
  @param {*} obj JS object to hash
  @param {Object} [opts] Options
  @param {string} [opts.alg=sha256] Crypto algorithm to use
  @param {string} [opts.enc=hex] Hash string encoding
  @return {string} Object hash value
  @memberOf module:node-object-hash
  @instance
  @public
  @alias hash
  @example
  var apiConstructor = require('node-object-hash');
  var hasher = apiConstructor({sort:true, coerce:true}).hash;
  
  hash({b: {b: 1, d: 'x'}, c: 2, a: [3, 5, 1]});
  // "4c18ce0dcb1696b329c8568d94a9830da810437d8c9e6cecf5d969780335a26b"