1.0.1 • Published 3 years ago

time-stamped-message v1.0.1

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

time-stamped-console-log

A simple time stamped console.log()

usage

npm i time-stamped-console-log

or

npm i -D time-stamped-console-log

if the time was quarter past nine in the morning
const tscl = require('time-stamped-console-log')
tscl("hello world!");  
// 09:15:27 hello world!

Options. All options are optional :)

const tscl = require('time-stamped-console-log')
tscl("hello world!", {
	time: {
		color: string,
		background: string,
		dim: boolean,			// default: true
		bright: boolean,		// default: false
		underscore: boolean		// default: false
	},
	message: {
		color: string,			
		background: string,
		dim: boolean,			// default: false
		bright: boolean,		// default: false
		underscore: boolean		// default: false
	}	
});  

color and background choices are:

  • "red"
  • "green"
  • "blue"
  • "black"
  • "yellow"
  • "cyan"
  • "magenta"
  • "white"
  • "crimson"