mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-29 02:19:08 +00:00
14 lines
324 B
JavaScript
14 lines
324 B
JavaScript
'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)
|
|
}
|
|
}
|