stripLow.js 642 B

123456789101112131415161718192021
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = stripLow;
  6. var _assertString = _interopRequireDefault(require("./util/assertString"));
  7. var _blacklist = _interopRequireDefault(require("./blacklist"));
  8. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9. function stripLow(str, keep_new_lines) {
  10. (0, _assertString.default)(str);
  11. var chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F';
  12. return (0, _blacklist.default)(str, chars);
  13. }
  14. module.exports = exports.default;
  15. module.exports.default = exports.default;