kanmi-perf
Version:
In-browser JavaScript tool for real-time Core Web Vitals insights
86 lines (57 loc) โข 1.78 kB
Markdown
# ๐ KanmiPerf
> Real-time in-browser Core Web Vitals diagnostics โ no setup, just insights.
[](https://www.npmjs.com/package/kanmi-perf)
[](https://konfirmed.github.io/KanmiPerf/)
**KanmiPerf** helps developers **identify**, **understand**, and **fix** web performance issues directly in the browser console.
## ๐ธ Visual Output
```txt
[KanmiPerf ๐] โ ๏ธ LCP
- Largest Contentful Paint: 2300ms
- Element: IMG
โ Optimize images, text, and video content for faster loading
```
## ๐ฆ Installation
**CDN (IIFE)**
```html
<script src="https://cdn.jsdelivr.net/npm/kanmi-perf@0.2.0/dist/kanmi-perf.js" defer></script>
```
**ESM Module**
```js
import KanmiPerf from "https://cdn.jsdelivr.net/npm/kanmi-perf@0.2.0/dist/kanmi-perf.esm.js";
KanmiPerf.init();
```
**NPM**
```bash
npm install kanmi-perf
```
```js
import KanmiPerf from 'kanmi-perf';
KanmiPerf.init();
```
## ๐งช Usage
- Use `.init()` to auto-run on load.
- Or call `.run()` manually for immediate analysis.
```js
KanmiPerf.run();
console.log(KanmiPerf.metrics);
console.log(KanmiPerf.issues);
```
## ๐ฌ What It Detects
- ๐ผ๏ธ Images missing dimensions (CLS)
- ๐ฆ Blocking `<script>` in `<head>`
- ๐ Sync third-party scripts
- ๐ง Long Tasks
- ๐๏ธ LoAF (Long Animation Frames)
- โ LCP (Largest Contentful Paint)
- ๐ CLS (Cumulative Layout Shift)
- ๐ฑ๏ธ INP (Interaction to Next Paint)
## ๐ Related
Check out the enhanced [KanmiPerf Pro](https://www.npmjs.com/package/kanmi-perf-pro) with full logs, outlines, exportable data, and timeline overlays.
## ๐ License
MIT โ [Kanmi Obasa](https://www.konfirmed.com)