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

@wufengtech/bbs-util

v0.0.69

Published

## Requirement

Readme

BBS Util

Requirement

  • 编辑器依赖 element-ui , Vue 需要配置 Vue.use(ElementUI)
  • axios 需要配置好 baseURL

Editor

import { setup, init, destroy, setErrorMsg } from "@wufengtech/bbs-util/lib/editor"
import "@wufengtech/bbs-util/lib/editor/index.css"

setup({
  axios, // axios 对象
  Vue, // Vue 对象
  $confirm, // 参考 element this.$confirm 接口
  $toast, // string => null 错误提示
  $loading, // 参考 element this.$loading 接口
  imgURLPrefix, // oss 前缀
})

init(
  document.querySelector(".editor-container"),
  defaultValue = null, // YouxiDoc 初始文档,可以传 null
  onChange = null, // (originValue slate内部文档结构, YouxiDoc 文档结构) => {}
  {
    userID: string = null, // 不传 userID 则以下额外功能都会关闭,也不会缓存用户最近插入信息
    gameID: string = null, // 如果需要开启 @ 或者阵容,必须传入游戏 ID
    atEnabled: bool = false, // 是否开启 @ 功能
    squadEnabled: bool = false, // 是否开启插入阵容功能
    watermarkEnable: bool = false, // 水印开关
  }, // optional
)

Renderer

PC 端 container class .editor.renderer-pc Mobile 端 container class editor.renderer-mobile 分享页 container class editor.renderer-mobile.renderer-share-page

import { setup, renderPC, renderMobile, renderSharePage } from "@wufengtech/bbs-util/lib/renderer"
import "@wufengtech/bbs-util/lib/renderer/index.css"

setup({axios})

renderPC(YouxiDoc) => html
renderMobile(YouxiDoc) => html
renderSharePage(YouxiDoc) => html

Tooltip

import { setup, init, destroy } from "@wufengtech/bbs-util/lib/tooltip"
import "@wufengtech/bbs-util/lib/tooltip/index.css"

setup({axios})

// 开启后, 设置了以下 dom 属性会触发 tooltip
// class: [editor__item, editor__champion, editor__talent, editor__synergy]
// <div
//   data-no=""
//   data-gameid=""
//   data-version=""
//   disableclick="" 是否关闭点击跳转 wiki 功能
// ></div>
init()

// 调用后,关闭 tooltip 功能
destroy()

Common

import { getArticleRenderConfig } from "@wufengtech/bbs-util/lib/common"

getArticleRenderConfig(article 后端返回的 article 详情数据, isMyArticle: 是否是自己的文章) => {
  hint: HTML string // 文章状态的提示信息,为 "" 时不显示
  show: bool // 是否显示文章
}