colorslog-js
v0.0.1
Published
colors-log is a simple library for console.log colors.
Readme
colors-log
colors-log is a simple library for console.log colors.
Installation
npm install colorslog-jsUsage
With JS:
import useLogger from 'colorslog-js';
// in root files
useLogger();
// in components
console.print('hello world');
console.print('hello world', {}, 'success');
console.print('hello world', {
scheme: {
backgroundColor: '#fdf1f0',
color: '#ef361a',
}
});
With Vue.js:
// main.ts
import {printPlugin} from 'colorslog-js';
Vue.use(printPlugin);
const instance = getCurrentInstance();
const $print = instance?.appContext.config.globalProperties.$print
// or
console.pint('hello world');
// Note: `$print` is a global property.
Features under development...
(Not for use in production line environments)
