Getting Started
Try It Online
You can try kittylog directly in your browser on Codesandbox.
Installation
Prerequisites
You can install kittylog with:
bash
npm add kittylog
bash
pnpm add kittylog
bash
yarn add kittylog
bash
bun add kittylog
Install kittylog as dev dependency
If you want, you can install it as dev dependency with current command:
bash
npm add -D kittylog
bash
pnpm add -D kittylog
bash
yarn add -D kittylog
bash
bun add -D kittylog
Basic usage
Use ES6 Modules
js
import kittylog from "kittylog";
kittylog.info("Info...");
kittylog.success("Success...");
kittylog.warning("Warn...");
kittylog.error("Error...");
NOTE
To use ES6 modules, you have to insert the property "type": "module"
in the package.json
How to add it?
json
{
"name": "kittylog",
"version": "1.0.2",
"description": "Pretty logs in JavaScript",
"author": "pietrodev07",
"type": "module",
"scripts": {
"build": "tsc",
},
"devDependencies": {
"typescript": "^5.3.3"
}
}
Use CommonJS Modules
js
const kittylog = require("kittylog");
kittylog.info("Info...");
kittylog.success("Success...");
kittylog.warning("Warn...");
kittylog.error("Error...");
NOTE
To use ES6 modules, you have to insert the property "type": "commonjs"
in the package.json
It is by default, so you don't need to add it!
How to add it?
json
{
"name": "kittylog",
"version": "1.0.2",
"description": "Pretty logs in JavaScript",
"author": "pietrodev07",
"type": "commonjs",
"scripts": {
"build": "tsc",
},
"devDependencies": {
"typescript": "^5.3.3"
}
}