Files
eagler-tiers/node_modules/@hapi/hoek/lib/escapeRegex.js
starified 08bf320b57 uploaded
2026-04-21 22:03:19 -04:00

12 lines
198 B
JavaScript

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