message: Make json-stringify-safe IE8 compatible
diff: +'use strict';
  +
  +/*
  + json-stringify-safe
  + Like JSON.stringify, but doesn't throw on circular references.
  +
  + Originally forked from https://github.com/isaacs/json-stringify-safe
  + version 5.0.1 on 3/8/2017 and modified for IE8 compatibility.
  + Tests for this are in test/vendor.
  +
  + ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
  +*/
  +
  exports = module.exports = stringify
  exports.getSerialize = serializer
  +function indexOf(haystack, needle) {
  + for (var i = 0; i < haystack.length; ++i) {
  + if (haystack[i] === needle) return i;
  + }
  + return -1;
  +}
  +
  function stringify(obj, replacer, spaces, cycleReplacer) {
  return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
  }
  @@ -9,16 +29,16 @@ function serializer(replacer, cycleReplacer) {
  var stack = [], keys = []
  if (cycleReplacer == null) cycleReplacer = function(key, value) {
  - if (stack[0] === value) return "[Circular ~]"
  - return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"
  + if (stack[0] === value) return '[Circular ~]'
  + return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']'
  }
  return function(key, value) {
  if (stack.length > 0) {
  - var thisPos = stack.indexOf(this)
  + var thisPos = indexOf(stack, this);
  ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)
  ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)
  - if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)
  + if (~indexOf(stack, value)) value = cycleReplacer.call(this, key, value)
  }
  else stack.push(value)
  