我想创建一个回调以便稍后检索其数据。
foo.js
const bar = require('bar');
bar.fix(part,(err,fixed)=>{
if(err)
return//handle err
if (!fixed)
return//handle not fixed
else handle fixed
});
bar.js
module.exports.fix =(part,(err,fixed)=>{
//how can I manipulate err and fixed here to take effect on foo.js
})