mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
324 B
14 lines
324 B
9 years ago
|
'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)
|
||
|
}
|
||
|
}
|