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

@stylewx/publisher

v0.4.1

Published

stylewx publisher: WeChat Official Account API wrapper (access_token, image upload, draft/add) + external-image relocation. Node-only by design.

Readme

@stylewx/publisher

微信公众号草稿箱客户端:只发草稿,不群发

安装

npm i @stylewx/publisher

用法

import {
  WeChatClient,
  loadConfigFromEnv,
  publishDraft,
  relocateExternalImages,
} from '@stylewx/publisher'

const client = new WeChatClient(loadConfigFromEnv())

// 可选:把外链图片搬进微信素材库(正文外链图会被微信拦截)
const localHtml = await relocateExternalImages(html, client)

const result = await publishDraft(client, {
  title: '文章标题',
  html: localHtml,
})

console.log(result.media_id) // 草稿 media_id

凭据

只从环境变量读取,不要在代码里硬编码:

| 变量 | 说明 | | --- | --- | | WECHAT_APP_ID | 公众号 AppID | | WECHAT_APP_SECRET | 公众号 AppSecret | | WECHAT_API_BASE | 可选,默认官方接口地址(便于走代理或自建网关) |

附带能力

  • relocateExternalImages(html, client) — 外链图片 → 微信素材库(实测 8 张外链图全部搬运成功, 返回的内容内图片地址为 mmbiz.qpic.cn
  • generateDefaultCover() — 未提供封面时生成 900×383 的默认封面

属于 stylewx —— 把 Markdown 排成微信公众号文章的工具链。MIT License.