docxtemplater
Version:
.docx generator working with templates and data (like Mustache)
22 lines (19 loc) • 475 B
JavaScript
const _ = require("lodash");
const wrapper = require("../module-wrapper");
class InspectModule {
constructor() {
this.inspect = {};
this.fullInspected = {};
this.filePath = null;
}
set(obj) {
if (obj.inspect) {
if (obj.inspect.filePath) {
this.filePath = obj.inspect.filePath;
}
this.inspect = _.merge({}, this.inspect, obj.inspect);
this.fullInspected[this.filePath] = this.inspect;
}
}
}
module.exports = () => wrapper(new InspectModule());