Files
supplier-dispatch-h5/node_modules/@hapi/hoek/lib/escapeRegex.js
2023-08-11 10:45:20 +08:00

12 lines
198 B
JavaScript

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