AlkantarClanX12

Your IP : 3.141.42.41


Current Path : /opt/alt/alt-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/libnpx/
Upload File :
Current File : //opt/alt/alt-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/libnpx/util.js

'use strict'

module.exports.promisify = promisify
function promisify (f) {
  const util = require('util')
  if (util.promisify) {
    return util.promisify(f)
  } else {
    return function () {
      return new Promise((resolve, reject) => {
        f.apply(this, [].slice.call(arguments).concat((err, val) => {
          err ? reject(err) : resolve(val)
        }))
      })
    }
  }
}