timelogz
v0.0.7
Published
A package for better console logs.
Downloads
2
Readme
Timelogz
About
A simple but useful tool for better console.log;
Installation
npm i timelogz
Current Commands
timelog() | logMemoryUsage()
Command Examples
timelog()
Code
const { timelog } = require("timelogz");
timelog({
text: `Heya!`,
color: "red",
});
Output
logMemoryUsage()
Code
const { logMemoryUsage } = require("timelogz");
logMemoryUsage(true);
Output
If it is set to true
else if its set to false or not specified
There is also a function to return formatted memory as an object
const { memory } = require("timelogz");
const mem = memory();
console.log(mem.external);
console.log(mem.rss);
console.log(mem.heapTotal);
console.log(mem.heapUsed);
/*
also added
mem.cpu.system && mem.cpu.user
*/
Output
timestamp
const { timestamp } = require("timelogz");
console.log(timestamp());
Output
1-8-2023 15:43:20.867
-- Last Updated -> 14/8/2023