• File: escapeRegex.js
  • Full Path: /var/www/nodejs/Notifications_Imali_API/node_modules/@hapi/hoek/lib/escapeRegex.js
  • Date Modified: 10/26/1985 3:15 PM
  • File size: 198 bytes
  • MIME-type: text/plain
  • Charset: utf-8
'use strict';

const internals = {};


module.exports = function (string) {

    // Escape ^$.*+-?=!:|\/()[]{},

    return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&');
};