blacklist.js 498 B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = blacklist;
  6. var _assertString = _interopRequireDefault(require("./util/assertString"));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. function blacklist(str, chars) {
  9. (0, _assertString.default)(str);
  10. return str.replace(new RegExp("[".concat(chars, "]+"), 'g'), '');
  11. }
  12. module.exports = exports.default;
  13. module.exports.default = exports.default;