UNPKG

kanmi-perf

Version:

In-browser JavaScript tool for real-time Core Web Vitals insights

86 lines (57 loc) โ€ข 1.78 kB
# ๐Ÿš€ KanmiPerf > Real-time in-browser Core Web Vitals diagnostics โ€“ no setup, just insights. [![npm version](https://img.shields.io/npm/v/kanmi-perf.svg)](https://www.npmjs.com/package/kanmi-perf) [![Live Demo](https://img.shields.io/badge/demo-online-green)](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)