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

micro-down-sdk

v1.1.4

Published

## 主要功能 1. 参数校验

Readme

应用宝微下载 SDK

主要功能

  1. 参数校验

    对微下载参数进行必要的校验, 协助接入方在开发阶段发现参数问题

  2. 微信内直接拉起 App

    通过 SDK 生成的微下载链接, 支持微信内直接拉起 App, 提高拉活转化

接入步骤

  1. 提供接入信息

    联系我们, 提供接入 SDK 的 App 包名及 H5 域名, 支持一个包名对应多个域名

  2. 安装并初始化 SDK

    NPM 方式

    使用 npm / pnpm / yarn 等工具进行安装:

    npm i -S micro-down-sdk

    初始化SDK:

    import { MicroDown } from 'micro-down-sdk';
    
    (async () => {
      const microDown = new MicroDown();
      // 初始化 SDK, 支持微下载链接所有参数, 至少传入 pkgName
      await microDown.init({
        pkgName: 'com.xingin.xhs',
      });
    })();

    CDN 方式

    通过 script 标签引入 SDK, 最新 SDK 链接为: https://yyb.qpic.cn/micro-down-sdk/micro-down-sdk@1/micro-down-sdk-cdn.min.js

    <script src="https://yyb.qpic.cn/micro-down-sdk/micro-down-sdk@1/micro-down-sdk-cdn.min.js"></script>

    初始化SDK:

    (async () => {
      const microDown = new window.MicroDownSDK.MicroDown();
      // 初始化 SDK, 支持微下载链接所有参数, 至少传入 pkgName
      await microDown.init({
        pkgName: 'com.xingin.xhs',
      });
    })();
  3. 生成微下载链接或跳转微下载页面

    SDK 初始化完成后, 可调用方法生成微下载链接自行跳转, 或直接调用跳转方法

    // 获取微下载链接, 接入方拿到链接后自行进行跳转
    const url = await microDown.genMicroDownURL();
    
    // 直接跳转微下载页面, 内部使用 location.href 进行跳转
    await microDown.jumpMicroDownURL();

参数说明

SDK 初始化参数如下, 具体参数解释可参考: https://wikinew.open.qq.com/index.html#/iwiki/4007776125

注: 所有参数不需要进行 URL 编码, SDK 内部会处理

/** SDK 初始化选项 */
export interface Option {
  /** 包名, 对应原始参数 pkgname */
  pkgName: string;
  /** 安卓 schema, 对应链接参数 android_schema */
  androidSchema?: string;
  /** iOS schema, 对应链接参数 ios_schema */
  iOSSchema?: string;
  /** CP 应用的渠道包 channelId, 对应链接参数 channel */
  channelId?: number;
  /** CP 应用的渠道包 key, 对应链接参数 ckey */
  channelKey?: string;
  /** 应用宝的渠道包id, 对应链接参数 g_f */
  yybChannelPkgId?: number;
  /** 模版ID, 对应链接参数 template_id */
  templateId?: string;
}