5 lines
232 B
JavaScript
5 lines
232 B
JavaScript
// https://github.com/benjamingr/RexExp.escape
|
|
var $export = require('./_export');
|
|
var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
|
|
$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });
|