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

@wangofnextdoor/zzd-config

v1.0.0

Published

浙政钉配置和流量分析工具包

Downloads

5

Readme

@wx/zzd-config

浙政钉配置和流量分析工具包

安装

npm install @wx/zzd-config

使用方法

初始化流量分析

import { initFlowAnalysis, setUserInfo, sendPageView } from '@wx/zzd-config';

// 初始化流量分析
await initFlowAnalysis();

// 设置用户信息
setUserInfo('user123', 'device456');

// 发送页面浏览埋点
sendPageView({
  page_id: 'home',
  page_name: '首页'
});

初始化WPK日志

import { initWpkLog } from '@wx/zzd-config';

// 使用默认配置初始化
await initWpkLog();

// 使用自定义配置初始化
await initWpkLog({
  bid: 'custom_bid',
  signkey: 'custom_key',
  gateway: 'https://custom.gateway.com'
});

配置管理

import { getAppConfig } from '@wx/zzd-config';

// 获取当前应用配置
const config = getAppConfig();
console.log(config);

API 文档

initFlowAnalysis()

初始化流量分析SDK

setUserInfo(userId: string, deviceId?: string)

设置用户信息

sendPageView(params?: PageViewParams)

发送页面浏览埋点

initWpkLog(config?: Partial)

初始化WPK日志

getAppConfig()

获取应用配置

类型定义

interface PageViewParams {
  sapp_id?: string;
  sapp_name?: string;
  page_id?: string;
  page_name?: string;
  page_url?: string;
  [key: string]: any;
}

interface WpkConfig {
  bid: string;
  signkey: string;
  gateway: string;
}

注意事项

  1. 此包只能在浏览器环境中使用
  2. 需要确保网络能够访问相关的CDN资源
  3. 在SSR环境中使用时需要做好环境检查