..:: Source code - 056global_properties_node.js ::..

/**
 * List all 'global' properties
 */
var property;

for (property in global) {
  if (global.hasOwnProperty(property)) {
    console.log("global." + property + " = " + global[property]);
  }
}
 

..:: NodeJS Console - 056global_properties_node.js ::..

$ node 056global_properties_node.js
global.global = [object global]
global.clearImmediate = function clearImmediate(immediate) {
  if (!immediate || immediate._destroyed)
    return;

  immediateInfo[kCount]--;
  immediate._destroyed = true;

  if (immediate[kRefed] && --immediateInfo[kRefCount] === 0) {
    // We need to use the binding as the receiver for fast API calls.
    binding.toggleImmediateRef(false);
  }
  immediate[kRefed] = null;

  if (destroyHooksExist() && immediate[async_id_symbol] !== undefined) {
    emitDestroy(immediate[async_id_symbol]);
  }

  immediate._onImmediate = null;

  immediateQueue.remove(immediate);
}
global.setImmediate = function setImmediate(callback, arg1, arg2, arg3) {
  validateFunction(callback, 'callback');

  let i, args;
  switch (arguments.length) {
    // fast cases
    case 1:
      break;
    case 2:
      args = [arg1];
      break;
    case 3:
      args = [arg1, arg2];
      break;
    default:
      args = [arg1, arg2, arg3];
      for (i = 4; i < arguments.length; i++) {
        // Extend array dynamically, makes .apply run much faster in v6.0.0
        args[i - 1] = arguments[i];
      }
      break;
  }

  return new Immediate(callback, args);
}
global.clearInterval = function clearInterval(timer) {
  // clearTimeout and clearInterval can be used to clear timers created from
  // both setTimeout and setInterval, as specified by HTML Living Standard:
  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval
  clearTimeout(timer);
}
global.clearTimeout = function clearTimeout(timer) {
  if (timer && timer._onTimeout) {
    timer._onTimeout = null;
    unenroll(timer);
    return;
  }
  if (typeof timer === 'number' || typeof timer === 'string') {
    const timerInstance = knownTimersById[timer];
    if (timerInstance !== undefined) {
      timerInstance._onTimeout = null;
      unenroll(timerInstance);
    }
  }
}
global.setInterval = function setInterval(callback, repeat, arg1, arg2, arg3) {
  validateFunction(callback, 'callback');

  let i, args;
  switch (arguments.length) {
    // fast cases
    case 1:
    case 2:
      break;
    case 3:
      args = [arg1];
      break;
    case 4:
      args = [arg1, arg2];
      break;
    default:
      args = [arg1, arg2, arg3];
      for (i = 5; i < arguments.length; i++) {
        // Extend array dynamically, makes .apply run much faster in v6.0.0
        args[i - 2] = arguments[i];
      }
      break;
  }

  const timeout = new Timeout(callback, repeat, args, true, true);
  insert(timeout, timeout._idleTimeout);

  return timeout;
}
global.setTimeout = function setTimeout(callback, after, arg1, arg2, arg3) {
  validateFunction(callback, 'callback');

  let i, args;
  switch (arguments.length) {
    // fast cases
    case 1:
    case 2:
      break;
    case 3:
      args = [arg1];
      break;
    case 4:
      args = [arg1, arg2];
      break;
    default:
      args = [arg1, arg2, arg3];
      for (i = 5; i < arguments.length; i++) {
        // Extend array dynamically, makes .apply run much faster in v6.0.0
        args[i - 2] = arguments[i];
      }
      break;
  }

  const timeout = new Timeout(callback, after, args, false, true);
  insert(timeout, timeout._idleTimeout);

  return timeout;
}
global.queueMicrotask = function queueMicrotask(callback) {
  validateFunction(callback, 'callback');

  const asyncResource = new AsyncResource(
    'Microtask',
    defaultMicrotaskResourceOpts,
  );
  asyncResource.callback = callback;

  enqueueMicrotask(FunctionPrototypeBind(runMicrotask, asyncResource));
}
global.structuredClone = function structuredClone() { [native code] }
global.atob = function atob(input) {
  // The implementation here has not been performance optimized in any way and
  // should not be.
  // Refs: https://github.com/nodejs/node/pull/38433#issuecomment-828426932
  if (arguments.length === 0) {
    throw new ERR_MISSING_ARGS('input');
  }

  input = `${input}`;
  let nonAsciiWhitespaceCharCount = 0;
  let equalCharCount = 0;

  for (let n = 0; n < input.length; n++) {
    const index = ArrayPrototypeIndexOf(
      kForgivingBase64AllowedChars,
      StringPrototypeCharCodeAt(input, n));

    if (index > 4) {
      // The first 5 elements of `kForgivingBase64AllowedChars` are
      // ASCII whitespace char codes.
      nonAsciiWhitespaceCharCount++;

      if (index === kEqualSignIndex) {
        equalCharCount++;
      } else if (equalCharCount) {
        // The `=` char is only allowed at the end.
        throw lazyDOMException('Invalid character', 'InvalidCharacterError');
      }

      if (equalCharCount > 2) {
        // Only one more `=` is permitted after the first equal sign.
        throw lazyDOMException('Invalid character', 'InvalidCharacterError');
      }
    } else if (index === -1) {
      throw lazyDOMException('Invalid character', 'InvalidCharacterError');
    }
  }

  let reminder = nonAsciiWhitespaceCharCount % 4;

  // See #2, #3, #4 - https://infra.spec.whatwg.org/#forgiving-base64
  if (!reminder) {
    // Remove all trailing `=` characters and get the new reminder.
    reminder = (nonAsciiWhitespaceCharCount - equalCharCount) % 4;
  } else if (equalCharCount) {
    // `=` should not in the input if there's a reminder.
    throw lazyDOMException('Invalid character', 'InvalidCharacterError');
  }

  // See #3 - https://infra.spec.whatwg.org/#forgiving-base64
  if (reminder === 1) {
    throw lazyDOMException(
      'The string to be decoded is not correctly encoded.',
      'InvalidCharacterError');
  }

  return Buffer.from(input, 'base64').toString('latin1');
}
global.btoa = function btoa(input) {
  // The implementation here has not been performance optimized in any way and
  // should not be.
  // Refs: https://github.com/nodejs/node/pull/38433#issuecomment-828426932
  if (arguments.length === 0) {
    throw new ERR_MISSING_ARGS('input');
  }
  input = `${input}`;
  for (let n = 0; n < input.length; n++) {
    if (input[n].charCodeAt(0) > 0xff)
      throw lazyDOMException('Invalid character', 'InvalidCharacterError');
  }
  const buf = Buffer.from(input, 'latin1');
  return buf.toString('base64');
}
global.performance = [object Performance]
global.fetch = function fetch(input, init = undefined) {
      return lazyUndici().fetch(input, init);
    }
global.crypto = [object Crypto]
$ps -aux | grep node (list all node processes)
sasa        1197  1.0  0.3 1327212 57540 ?       Ssl  Oct18 481:49 node /home/sasa/.pm2/modules/pm2-logrotate/node_modules/pm2-logr
sasa        1211  5.4  0.4 11845888 77596 ?      Ssl  Oct18 2565:31 node /home/sasa/dex8/dex8-api/starter.js
sasa        1218  0.4  0.2 11798704 42872 ?      Ssl  Oct18 214:18 node /home/sasa/dex8/dex8-panel/server/index.js
sasa        1219  0.7  0.4 11814040 71612 ?      Ssl  Oct18 347:31 node /home/sasa/dex8/dex8-www/server/index.js
sasa        1248  0.6  0.3 1332400 55664 ?       Ssl  Oct18 308:06 node /home/sasa/mikosoft-info/api-mikosoft-info/starter.js
sasa        1274  0.3  0.2 1310052 42492 ?       Ssl  Oct18 150:19 node /home/sasa/mikosoft-info/www-mikosoft-info/server/index.js
sasa        1337  0.7  0.5 1170356 87192 ?       Ssl  Oct18 348:23 node /home/sasa/voovuu/voovuu-api/starter.js
sasa        1387  0.3  0.3 11798204 49480 ?      Ssl  Oct18 175:02 node /home/sasa/@mikosoft/dodo-examples/server/index.js
sasa        1457  0.3  0.2 1303104 37744 ?       Ssl  Oct18 153:46 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1458  0.3  0.2 22280364 40184 ?      Ssl  Oct18 155:17 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1514  0.3  0.1 1234404 31832 ?       Ssl  Oct18 151:13 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1515  0.3  0.1 1168484 32344 ?       Ssl  Oct18 150:48 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1593  0.3  0.1 1168356 31196 ?       Ssl  Oct18 151:31 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1595  0.3  0.1 1168736 30620 ?       Ssl  Oct18 151:09 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1660  0.3  0.1 1168368 31164 ?       Ssl  Oct18 150:54 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1661  0.3  0.1 1167968 30640 ?       Ssl  Oct18 151:01 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1732  0.3  0.1 1102176 29260 ?       Ssl  Oct18 150:30 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1734  0.3  0.1 1102176 29356 ?       Ssl  Oct18 150:07 node /home/sasa/dex8/dex8-worker/starter.js
sasa        1792  4.4  2.9 12350996 488240 ?     Ssl  Oct18 2107:40 node /home/sasa/mikosoft-info/crypto-mikosoft-info/server/index.
www-data   91515  0.0  0.0   2608   520 ?        S    05:10   0:00 sh -c ps -aux | grep node
www-data   91517  0.0  0.0   3304   640 ?        S    05:10   0:00 grep node
sasa      367471  0.9  0.3 11854808 65248 ?      Ssl  Oct21 412:46 node /home/sasa/miko/miko-hr/server/index.js
sasa     2446447  0.5  0.5 11858624 89524 ?      Ssl  Nov09  82:58 node /home/sasa/mikosoft-info/dodo-mikosoft-info/server/index.js
sasa     2511306  0.5  0.2 1329868 43816 ?       Ssl  Nov10  79:15 node /home/sasa/miko/miko-hr/api/starter.js
sasa     3034860  0.4  0.4 11813244 73336 ?      Ssl  Nov13  49:01 node /home/sasa/mikosoft_hr/www-mikosoft-hr/server/index.js
sasa     3040759  0.3  0.2 1296580 40088 ?       Ssl  Nov13  33:39 node /home/sasa/dex8/dex8-kiosk/server/index.js
root     3404628  0.0  0.0   9492  2228 ?        Ss   Nov13   0:00 bash -c  which psql mongosh mongo 2>/dev/null echo "=== PG test ===" PGPASSWORD="w583Cr#ZED" psql -h 127.0.0.1 -p 6543 -U kriptus_user -d kriptus_dev -tAc "SELECT 1" 2>&1 | head -5 echo "=== MONGO test (node) ===" cd /home/sasa/kriptus/kriptus-api 2>/dev/null && node -e " const {MongoClient}=require(\"mongodb\"); (async()=>{ try{ const c=new MongoClient(\"mongodb://kript:12345@127.0.0.1:27017/kriptus-dev\",{serverSelectionTimeoutMS:5000}); await c.connect(); const d=await c.db().admin().listDatabases(); console.log(\"DBS:\", d.databases.map(x=>x.name).join(\",\")); await c.close(); }catch(e){ console.log(\"ERR\", e.message); } })(); " 2>&1 | head -5 
root     3404790  0.0  0.2 1118564 39032 ?       Sl   Nov13   1:25 node -e  const {MongoClient}=require("mongodb"); (async()=>{ try{ const c=new MongoClient("mongodb://kript:12345@127.0.0.1:27017/kriptus-dev",{serverSelectionTimeoutMS:5000}); await c.connect(); const d=await c.db().admin().listDatabases(); console.log("DBS:", d.databases.map(x=>x.name).join(",")); await c.close(); }catch(e){ console.log("ERR", e.message); } })(); 
sasa     4075330  8.8  4.3 12411868 714336 ?     Ssl  Nov18 237:38 node /home/sasa/voovuu/voovuu-pub/server/index.js