dld_backend/node_modules/@hapi/hoek/lib/escapeRegex.js
2025-10-30 12:13:02 +05:30

12 lines
198 B
JavaScript
Executable File

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