You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
637 B

4 years ago
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _parseTrbl = require('./parseTrbl');
  6. var _parseTrbl2 = _interopRequireDefault(_parseTrbl);
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. exports.default = v => {
  9. const value = (0, _parseTrbl2.default)(v);
  10. if (value[3] === value[1]) {
  11. value.pop();
  12. if (value[2] === value[0]) {
  13. value.pop();
  14. if (value[0] === value[1]) {
  15. value.pop();
  16. }
  17. }
  18. }
  19. return value.join(' ');
  20. };
  21. module.exports = exports['default'];