hrms-manual/node_modules/@hapi/hoek/lib/escapeRegex.js
2023-09-06 14:51:44 +07:00

11 lines
198 B
JavaScript
Executable file

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