text: 'use strict';
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
  
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  /**
   * Provides a format transform for ESComplex report instances converting them to a JSON string.
   */
  var FormatJSON = function () {
    function FormatJSON() {
      _classCallCheck(this, FormatJSON);
    }
  
    _createClass(FormatJSON, [{
      key: 'formatReport',
  
      /**
       * Formats a report as a JSON string.
       *
       * @param {ClassReport|MethodReport|ModuleReport|ProjectReport} report - A report to format.
       *
       * @param {object}         options - (Optional) One or more optional parameters passed to the formatter.
       * @property {number}      spacing - (Optional) An integer defining the JSON output spacing.
       *
       * @returns {string}
       */
      value: function formatReport(report) {
        var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
  
        return (typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object' && Number.isInteger(options.spacing) ? JSON.stringify(report, void 0, options.spacing) : JSON.stringify(report);
      }
  
      /**
       * Gets the file extension.
       *
       * @returns {string}
       */
  
    }, {
      key: 'isSupported',
  
  
      /**
       * Returns whether a given ReportType is supported by this format transform.
       *
       * @returns {boolean}
       */
      value: function isSupported() {
        return true;
      }
    }, {
      key: 'extension',
      get: function get() {
        return 'json';
      }
  
      /**
       * Gets the format name.
       *
       * @returns {string}
       */
  
    }, {
      key: 'name',
      get: function get() {
        return 'json';
      }
  
      /**
       * Gets the format type.
       *
       * @returns {string}
       */
  
    }, {
      key: 'type',
      get: function get() {
        return 'full';
      }
    }]);
  
    return FormatJSON;
  }();
  
  exports.default = FormatJSON;
  module.exports = exports['default'];