https://github.com/kiesun/per-moniteur
一个方便获取各类性能指标及 Web Vitals 的库。
https://github.com/kiesun/per-moniteur
Last synced: 5 months ago
JSON representation
一个方便获取各类性能指标及 Web Vitals 的库。
- Host: GitHub
- URL: https://github.com/kiesun/per-moniteur
- Owner: KieSun
- License: mit
- Created: 2020-12-14T14:06:43.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-22T13:59:08.000Z (over 4 years ago)
- Last Synced: 2025-04-20T23:33:57.490Z (6 months ago)
- Language: TypeScript
- Homepage:
- Size: 211 KB
- Stars: 108
- Watchers: 4
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# per-moniteur
一个方便获取各类性能指标及 Web Vitals 的库。
## 安装
```bash
npm install per-moniteur --save
```## 使用
```js
import PerMoniteur from 'per-moniteur'new PerMoniteur({
tracker: (type, data, allData) => {
console.log('type: ', type)
console.log(`${type} data: `, data)
console.log('allData: ', allData)
},
})
```## 能获取的数据指标
- NavigationTime
- NetworkInfo
- FP
- FCP
- FID
- TBT
- LCP
- CLS
- TTI
- FMP
- Web Vitals Score## License
MIT © yck.