UNPKG

canonical

Version:

Canonical code style linter and formatter for JavaScript, SCSS and CSS.

36 lines (24 loc) 828 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _table = require('./formatters/table'); var _table2 = _interopRequireDefault(_table); var _checkstyle = require('./formatters/checkstyle'); var _checkstyle2 = _interopRequireDefault(_checkstyle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * @param {string} name Default: table * @return {Function} */ exports.default = function () { let name = arguments.length <= 0 || arguments[0] === undefined ? 'table' : arguments[0]; if (name === 'checkstyle') { return _checkstyle2.default; } if (name === 'table') { return _table2.default; } throw new Error('Unknown formatter ("' + name + '").'); }; //# sourceMappingURL=getFormatter.js.map