[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: utils.js
export const pxToRem = ( pixels ) => { if ( ! pixels ) { return; } else if ( 'string' !== typeof pixels ) { pixels = pixels.toString(); } return pixels .split( ' ' ) .map( ( value ) => `${ value * 0.0625 }rem` ) .join( ' ' ); }; export const arrayToClassName = ( array, action ) => { return array .filter( ( item ) => 'object' === typeof ( item ) ? Object.entries( item )[ 0 ][ 1 ] : item ) .map( ( item ) => { const value = 'object' === typeof ( item ) ? Object.entries( item )[ 0 ][ 0 ] : item; return action ? action( value ) : value; } ) .join( ' ' ); }; export const stringToRemValues = ( string ) => { return string .split( ' ' ) .map( ( value ) => pxToRem( value ) ) .join( ' ' ); }; export const rgbToHex = ( r, g, b ) => '#' + [ r, g, b ].map( ( x ) => { const hex = x.toString( 16 ); return 1 === hex.length ? '0' + hex : hex; } ).join( '' ); export const isOneOf = ( filetype, filetypeOptions ) => { return filetypeOptions.some( ( type ) => filetype.includes( type ) ); }; export const arrayToObjectByKey = ( array, key ) => { const finalObject = {}; array.forEach( ( item ) => finalObject[ item[ key ] ] = item ); return finalObject; };
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server.dijitaldukkanim.com.tr
Server IP: 104.247.168.220
PHP Version: 8.1.33
Server Software: Apache
System: Linux server.dijitaldukkanim.com.tr 4.18.0-553.105.1.el8_10.x86_64 #1 SMP Tue Feb 17 05:17:39 EST 2026 x86_64
HDD Total: 492.3 GB
HDD Free: 180.56 GB
Domains on IP: N/A (Requires external lookup)
System Features