How to use the kleur.black.bold function in kleur

To help you get started, we’ve selected a few kleur examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ziishaned / dumper.js / lib / dump.js View on Github external
start(obj, tab = '') {
		let dump = '';

		const isArray = this.getType(obj) === 'array';
		if (isArray) {
			dump = `${black.bold('array')} (size=${obj.length}) [\n`;
		} else {
			dump = `${black.bold('object')} (size=${Object.keys(obj).length}) {\n`;
		}

		for (let key in obj) {
			if (obj.hasOwnProperty(key)) {
				let val = '';
				const param = obj[key];

				const paramType = this.getType(param);
				switch (paramType) {
					case 'array':
					case 'object':
						val = this.start(param, `${tab}${this.spaces}`);
						break;
					case 'boolean':
						val = param ? `boolean ${cyan('true')}` : `boolean ${cyan('false')}`;
						break;
github ziishaned / dumper.js / lib / dump.js View on Github external
start(obj, tab = '') {
		let dump = '';

		const isArray = this.getType(obj) === 'array';
		if (isArray) {
			dump = `${black.bold('array')} (size=${obj.length}) [\n`;
		} else {
			dump = `${black.bold('object')} (size=${Object.keys(obj).length}) {\n`;
		}

		for (let key in obj) {
			if (obj.hasOwnProperty(key)) {
				let val = '';
				const param = obj[key];

				const paramType = this.getType(param);
				switch (paramType) {
					case 'array':
					case 'object':
						val = this.start(param, `${tab}${this.spaces}`);
						break;
					case 'boolean':