1.0.0 • Published 10 months ago

@harexs/style-log v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

@harexs/style-log

a simple console style log for devtools or nodejs

Install

$ npm install @harexs/style-log

Usage

import hLog from "@harexs/style-log";

const Log = hLog();
const warningLog = hLog({ type: "warning", title: "This is a Warning Log" });

Log("do something...", 1000);
warningLog("Let me see");

configuration

You can customize the title content and type Eexample:

const Log = hLog({
  type: "warning",
  title: "This is a Warning Log",
  icon: "🌈",
  windowLogType: "trace",
  nodeLogType: "log",
});

Options Props:

interface OptionsProps {
  type?: optionTypes; // primary | secondary | success | warning | error | info
  icon?: string;
  title?: string;
  windowLogType?: logTypes; // log | trace | warn;
  nodeLogType?: logTypes; // log | trace | warn;
}
1.0.0

10 months ago