docs: function toJSON(obj, pretty, def) {
      if (is_1.isString(pretty)) {
          def = pretty;
          pretty = undefined;
      }
      var tabs = 0;
      pretty = is_1.isBoolean(pretty) ? 2 : pretty;
      tabs = pretty ? pretty : tabs;
      if (!is_1.isObject(obj))
          return toDefault(null, def);
      return function_1.tryWrap(JSON.stringify, obj, null, tabs)(def);
  }