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 🙏

© 2025 – Pkg Stats / Ryan Hefner

rx-jweixin

v1.0.2

Published

Wrap jweixin with rxjs.

Downloads

10

Readme

rx-jweixin

Wrapping jweixin with rxjs.

使用 rxjs 对微信jssdk进行封装,里面再包一层Promise,以解决在 Angular 中 wx的回调函数无法更新页面的问题。定义了输入参数的格式,使得在使用 VSCode 等工具编辑时能进行提示。

使用

函数名基本一一对应微信jssdk文档

初始化 config

import { config } from "rx-jweixin";

config("appId","noncestr", 123123123, "signature", 
    [
        JsApi.chooseImage, 
        JsApi.getLocation, 
        "requestWxFacePictureVerify"
    ]).subscribe(
    )

获取地理位置

import { getLocation, LocationType, openLocation } from "rx-jweixin";

getLocation(LocationType.wgs84).subscribe(
                (res) => {
                    console.log(res.latitude);
                    console.log(res.longtitude);
                }
            );

调用未公开接口

import { config, invoke } from 'rx-jweixin';
config("appId", "noncestr", 123123123, "signature", ["requestWxFacePictureVerify"], true, true).subscribe(); 

invoke("requestWxFacePictureVerify", {
        appid: this.appId,
        request_verify_pre_info: JSON.stringify({
            name: name,
            id_card_number: idCardNum
        })
    }).subscribe(
        (res) => {
            console.log("Verification result: ", res);
        }
    );

现有问题

  1. 有关摇一摇的函数未能定义输出结果类型,因为微信的文档不够详细。
  2. 添加了一些在1.3.2版本中才见到的函数,1.2.0的文档中没有对应描述。

有任何问题,请在issue中提出,欢迎fork