summaryrefslogtreecommitdiff
path: root/src/node_modules/validator/es/lib/whitelist.js
blob: 244881b4190fa1c4591bee9f7d2f4a138d27d1c6 (plain)
1
2
3
4
5
import assertString from './util/assertString';
export default function whitelist(str, chars) {
  assertString(str);
  return str.replace(new RegExp("[^".concat(chars, "]+"), 'g'), '');
}