index.js
function stringify(value, replacer, indent) {
  if (isObject(replacer)) {
    var opts = replacer;
    replacer = opts.replacer;
    indent = opts.indent;
  }
  if (indent == null) {
    indent = 2;
  }
  return JSON.stringify(value, replacer, indent);
}
function stringify(value, replacer, indent) {
  if (isObject(replacer)) {
    var opts = replacer;
    replacer = opts.replacer;
    indent = opts.indent;
  }
  if (indent == null) {
    indent = 2;
  }
  return JSON.stringify(value, replacer, indent);
}
function stringify ( value , replacer , indent ) { if ( isObject ( replacer ) ) { var opts = replacer ; replacer = opts . replacer ; indent = opts . indent ; } if ( indent == null ) { indent = 2 ; } return JSON . stringify ( value , replacer , indent ) ; }
Utility function for stringifying the given value, ensuring that
options are correctly passed to `JSON.stringify`.

@param {any} `value`
@param {Function|Object} `replacer` Function or options object
@param {String|Number} `indent` The actual value to use for spacing, or the number of spaces to use.
@return {String}
Utility function for stringifying the given value ensuring that options are correctly passed to JSON . stringify .