NeahNew/node_modules/@hapi/hoek/lib/escapeRegex.js
2025-05-06 22:43:27 +02:00

12 lines
198 B
JavaScript
Executable File

'use strict';
const internals = {};
module.exports = function (string) {
// Escape ^$.*+-?=!:|\/()[]{},
return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&');
};