npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

xl_findbug

v1.0.2

Published

用户获取前端错误日志,前端错误信息收集

Readme

title

获取包

    npm install -g xl_findbug

实例一个对象

    new FindBug(option)

构造函数参数 option

version -- 版本号
extra -- 额外信息
user -- 用户信息
upload -- 上传函数 (params)=>{} param要上传的信息

异常信息对象 params

pathInfo -- 位置信息
extra -- 额外信息
stack -- 栈内信息(记录用户上传错误前的操作信息,默认会添加路径变化信息hash)
info -- 提示信息
level -- 错误级别
version -- 版本号
option -- 其他信息
user -- 用户信息

方法

uploadError(pathInfo,info,option)
上传一个错误信息,带有路径,可以定位到具体错误位置

pathInfo -- 错误的路径信息
info -- 信息msg
option --- 额外信息

captureException(msg,option)
上传一个异常信息,不用定位

msg -- 异常信息
options -- 额外信息

captureExceptionReact(error,option)
上传一个 react 在componentDidCatch捕获的异常信息

error -- 错误对象
option -- 额外信息

addStack(type,description)
向栈中加一条用户行为信息

type -- 行为名称
description -- 行为描述

setExtra(option={})

####### 设置额外信息

setUser(userInfo ={})
设置用户信息