index.js
function view(value) {
  try {
    /* eslint-disable no-else-return */
    /* istanbul ignore else - Browser. */
    if (inspect) {
      return inspect(value, {colors: false})
    } else {
      return JSON.stringify(value)
    }
  } catch (error) {
    /* istanbul ignore next - Cyclical. */
    return String(value)
  }
}
function view(value) {
  try {
    /* eslint-disable no-else-return */
    /* istanbul ignore else - Browser. */
    if (inspect) {
      return inspect(value, {colors: false})
    } else {
      return JSON.stringify(value)
    }
  } catch (error) {
    /* istanbul ignore next - Cyclical. */
    return String(value)
  }
}
/* Stringify a value to inspect it.  Tries `JSON.stringify()`,
and if that fails uses `String()` instead.  If `stringify()`
works.