devebot
Version:
Nodejs Microservice Framework
19 lines (18 loc) • 477 B
JavaScript
;
const lodash = require("lodash");
const toolset = require("./toolset");
function Chalk(params = {}) {
const themes = params.themes || {};
if (params.blanked !== true && toolset.has("colors")) {
const colors = toolset.get("colors");
colors.setTheme(themes);
return colors;
}
const self = this;
Object.keys(themes).forEach(function (name) {
lodash.set(self, name, function (str) {
return str;
});
});
}
module.exports = Chalk;