beyond
Version:
The Full Stack Universal Typescript Framework
22 lines (18 loc) • 516 B
JavaScript
module.exports = class extends require('../validator') {
_path;
_files;
skeleton = ['path', 'files'];
constructor(id, config) {
super();
this._id = id;
this.skeleton && this.skeleton.forEach(property => {
if (!config.hasOwnProperty(property)) return;
this[`_${property}`] = config[property];
});
}
getContent() {
const json = {};
json[this._id] = super.getContent();
return json;
}
}