0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.135.246.102


Current Path : /proc/thread-self/root/usr/share/npm/lib/install/
Upload File :
Current File : //proc/thread-self/root/usr/share/npm/lib/install/and-add-parent-to-errors.js

'use strict'
var validate = require('aproba')

module.exports = function (parent, cb) {
  validate('F', [cb])
  return function (er) {
    if (!er) return cb.apply(null, arguments)
    if (er instanceof Error && parent && parent.package && parent.package.name) {
      er.parent = parent.package.name
    }
    cb(er)
  }
}