HEX
Server: LiteSpeed
System: Linux premium221.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: madepabj (2566)
PHP: 8.3.26
Disabled: NONE
Upload Files
File: //opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/lib/install/action/extract-worker.js
'use strict'

const BB = require('bluebird')

const extract = require('pacote/extract')
const npmlog = require('npmlog')

module.exports = (args, cb) => {
  const parsed = typeof args === 'string' ? JSON.parse(args) : args
  const spec = parsed[0]
  const extractTo = parsed[1]
  const opts = parsed[2]
  if (!opts.log && opts.loglevel) {
    opts.log = npmlog
    opts.log.level = opts.loglevel
  }
  BB.resolve(extract(spec, extractTo, opts)).nodeify(cb)
}