trim.js 502 B

123456789101112131415161718192021
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = trim;
  6. var _rtrim = require('./rtrim');
  7. var _rtrim2 = _interopRequireDefault(_rtrim);
  8. var _ltrim = require('./ltrim');
  9. var _ltrim2 = _interopRequireDefault(_ltrim);
  10. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  11. function trim(str, chars) {
  12. return (0, _rtrim2.default)((0, _ltrim2.default)(str, chars), chars);
  13. }
  14. module.exports = exports['default'];