smartcheck/index.js

34 lines
1008 B
JavaScript
Raw Normal View History

2015-11-28 21:20:24 +00:00
/// <reference path="./index.ts" />
var Check = (function () {
function Check(nameArg, resultArg) {
this.name = nameArg;
this.result = resultArg;
}
return Check;
})();
var CheckStorage = (function () {
function CheckStorage() {
this.checks = [];
}
CheckStorage.prototype.addCheck = function (name, result) {
var localCheck = new Check(name, result);
this.checks.push(localCheck);
};
CheckStorage.prototype.print = function () {
for (var check in this.checks) {
var localTable = beautylog.table.new("checks");
localTable.push([this.checks[check].name, this.checks[check].result]);
localTable.print();
}
};
return CheckStorage;
})();
/// <reference path="typings/tsd.d.ts" />
/// <reference path="./classes.ts" />
var beautylog = require("beautylog")("os");
var smartcheck = {};
smartcheck.newStorage = function () {
return new CheckStorage;
};
module.exports = smartcheck;