57 lines
4.3 KiB
JavaScript
57 lines
4.3 KiB
JavaScript
/// <reference path="./typings/main.d.ts" />
|
|
var log = require("./beautylog.node.log");
|
|
exports.table = require("./beautylog.node.table");
|
|
var figletModule = require("./beautylog.node.figlet");
|
|
exports.figlet = figletModule.figlet;
|
|
exports.figletSync = figletModule.figletSync;
|
|
/**
|
|
* logs an directory to console
|
|
* @param logText
|
|
* @returns {boolean}
|
|
*/
|
|
exports.dir = function (logText) {
|
|
return log(logText, 'dir');
|
|
};
|
|
/**
|
|
* logs an error to console
|
|
* @param logText
|
|
* @returns {boolean}
|
|
*/
|
|
exports.error = function (logText) {
|
|
return log(logText, 'error');
|
|
};
|
|
/**
|
|
* logs an info to console
|
|
* @param logText
|
|
* @returns {boolean}
|
|
*/
|
|
exports.info = function (logText) {
|
|
return log(logText, 'info');
|
|
};
|
|
/**
|
|
* logs an 'OK!' message to console
|
|
* @param logText
|
|
* @returns {boolean}
|
|
*/
|
|
exports.ok = function (logText) {
|
|
return log(logText, 'ok');
|
|
};
|
|
/**
|
|
* logs a success to console
|
|
* @param logText string to log as error
|
|
* @returns {boolean}
|
|
*/
|
|
exports.success = function (logText) {
|
|
return log(logText, 'success');
|
|
};
|
|
/**
|
|
* logs a 'warn:' message to console
|
|
* @param logText string to log as error
|
|
* @returns {boolean}
|
|
*/
|
|
exports.warn = function (logText) {
|
|
return log(logText, 'warn');
|
|
};
|
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJlYXV0eWxvZy5ub2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRDQUE0QztBQUU1QyxJQUFPLEdBQUcsV0FBVyxzQkFBc0IsQ0FBQyxDQUFDO0FBQy9CLGFBQUssV0FBVyx3QkFBd0IsQ0FBQyxDQUFDO0FBRXhELElBQU8sWUFBWSxXQUFXLHlCQUF5QixDQUFDLENBQUM7QUFFOUMsY0FBTSxHQUFHLFlBQVksQ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