docs: function apiConstructor(options) {
    var defaults = options || {};
    var _sortObject;
  
    defaults.alg = defaults.alg || 'sha256';
    defaults.enc = defaults.enc || 'hex';
  
    _sortObject = objectSorter(options);
  
    /**
     * Creates sorted string from given object
     * @param {*} obj JS object to be sorted
     * @return {string} Sorted object string
     * @see {@link module:node-object-hash/objectSorter~makeObjectSorter~objectToString}
     * @memberOf module:node-object-hash
     * @instance
     * @public
     * @alias sort
     * @example
     * var apiConstructor = require('node-object-hash');
     * var sorter = apiConstructor({sort:true, coerce:true}).sort;
     *
     * sort({b: {b: 1, d: 'x'}, c: 2, a: [3, 5, 1]});
     * // "{a:[1,3,5],b:{b:1,d:x},c:2}"
     */
    function sortObject(obj) {
      return _sortObject(obj);
    }
  
    /**
     * 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"
     */
    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);
    }
  
    return {
      hash: hashObject,
      sortObject: sortObject,
      sort: sortObject
    };
  }