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 kittylogbash
pnpm add kittylogbash
yarn add kittylogbash
bun add kittylogInstall kittylog as dev dependency
If you want, you can install it as dev dependency with current command:
bash
npm add -D kittylogbash
pnpm add -D kittylogbash
yarn add -D kittylogbash
bun add -D kittylogBasic 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"
}
}