dld_backend/node_modules/@hapi/hoek/lib/escapeRegex.js
2025-11-04 13:17:18 +05:30

12 lines
198 B
JavaScript

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