core.regexp.escape.js 232 B

12345
  1. // https://github.com/benjamingr/RexExp.escape
  2. var $export = require('./_export');
  3. var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&');
  4. $export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });