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

callapp-5e

v0.0.2

Published

web awaken app

Readme

Web唤醒 App

  • 微信内部打开: 添加蒙层浏览器打开

  • Android: 打开App,唤醒失败则打开对应的应用商店或应用宝,都失败的话 则跳转下载链接

  • IOS: 打开App,唤醒失败失败则跳转appstore

用法

支持script外链引用

<script src="../../dist/index.umd.js"></script>
<script>
window.onload = function () {
    var vConsole = new window.VConsole();
    const callapp = new CallApp({
        isShowMask: true,
        urlScheme: 'snssdk141://search?keyword=cxk',
        failCallAppCb: failCallAppCb,
        universalLink: '',
        appstore: 'https://apps.apple.com/cn/app/%E4%BB%8A%E6%97%A5%E5%A4%B4%E6%9D%A1/id529092160',
        yybLink: 'https://a.app.qq.com/o/simple.jsp?android_scheme=snssdk143%3A%2F%2Fdetail%3Fgd_ext_json%3D%257B%2522__type__%2522%253A%2522wap%2522%252C%2522parent_group_id%2522%253A%25227311104976632283648%2522%252C%2522parent_rid%2522%253A%252216929978202522220169%2522%252C%2522traffic_type%2522%253A%2522weixin%2522%252C%2522page_type%2522%253A%2522article%2522%252C%2522label%2522%253A%2522click_wap_hly_houtiaoPCzhan%2522%252C%2522position%2522%253A%252214799599715000246%2522%252C%2522site_id%2522%253A%25225000246%2522%257D%26gd_label%3Dclick_wap_hly_houtiaoPCzhan%26groupid%3D7311104976632283648%26needlaunchlog%3D1%26zlink%3Dhttps%253A%252F%252Farticle.zlink.toutiao.com%252FrEPW%26zlink_click_time%3D1702522223777%26zlink_clipboard_uniq_id%3D02170252222360300000000000000000000ffff0a9c2f918c9ca4%26zlink_data%3D%257B%2522position%2522%253A%2522topbanner%2522%252C%2522gid%2522%253A%25227311104976632283648%2522%252C%2522utm_source%2522%253A%2522%2522%252C%2522share_token%2522%253A%2522%2522%252C%2522web_id%2522%253A%2522%2522%257D%26zlink_verify%3D472556&ckey=CK1459794838355&pkgname=com.ss.android.article.news'
    })
    document.getElementById('awaken').addEventListener('click', () => {
        callapp.openApp()
        console.info(callapp.getPlatform())
    })
}

function failCallAppCb() {
    console.info('唤醒失败')
}
</script>

支持npm包引用

import { useEffect, useRef } from 'react'
import './App.css'
import CallApp from 'callapp-5e'

type Awaken = CallApp

function App() {
  const awakenApp = useRef<Awaken>()
  useEffect(() => {
    awakenApp.current = new CallApp({isShowMask: true,
      urlScheme: 'snssdk141://search?keyword=cxk',
      failCallAppCb: failCallAppCb,
      universalLink: '',
      appstore: 'https://apps.apple.com/cn/app/%E4%BB%8A%E6%97%A5%E5%A4%B4%E6%9D%A1/id529092160',
      yybLink: 'https://a.app.qq.com/o/simple.jsp?android_scheme=snssdk143%3A%2F%2Fdetail%3Fgd_ext_json%3D%257B%2522__type__%2522%253A%2522wap%2522%252C%2522parent_group_id%2522%253A%25227311104976632283648%2522%252C%2522parent_rid%2522%253A%252216929978202522220169%2522%252C%2522traffic_type%2522%253A%2522weixin%2522%252C%2522page_type%2522%253A%2522article%2522%252C%2522label%2522%253A%2522click_wap_hly_houtiaoPCzhan%2522%252C%2522position%2522%253A%252214799599715000246%2522%252C%2522site_id%2522%253A%25225000246%2522%257D%26gd_label%3Dclick_wap_hly_houtiaoPCzhan%26groupid%3D7311104976632283648%26needlaunchlog%3D1%26zlink%3Dhttps%253A%252F%252Farticle.zlink.toutiao.com%252FrEPW%26zlink_click_time%3D1702522223777%26zlink_clipboard_uniq_id%3D02170252222360300000000000000000000ffff0a9c2f918c9ca4%26zlink_data%3D%257B%2522position%2522%253A%2522topbanner%2522%252C%2522gid%2522%253A%25227311104976632283648%2522%252C%2522utm_source%2522%253A%2522%2522%252C%2522share_token%2522%253A%2522%2522%252C%2522web_id%2522%253A%2522%2522%257D%26zlink_verify%3D472556&ckey=CK1459794838355&pkgname=com.ss.android.article.news'
    })
  }, [])
  const failCallAppCb = () => {
    alert('唤醒失败')
  }
  const openApp = () => {
    awakenApp.current?.openApp()
  }

  return (
    <>
      <div>
        <button onClick={openApp}>唤醒今日头条</button>
      </div>
    </>
  )
}

参数


const options = {
  // URL Scheme
  urlScheme?: string
  // universalLink
  universalLink?: string
  // App Store
  appstore?: string
  // android 商店平台
  androidMarket?: string
  // 下载地址
  androidDownloadUrl?: string
  // 超时时间
  timeout?: number
  // 特殊应用内部: 微信 是否显示蒙层
  isShowMask?: boolean
  // 唤醒失败的callback
  failCallAppCb?(f: {type: string, err: string, time: number}): void
}
const callApp = new CallApp(options)

API

openApp 打开App

callApp.openApp()

getPlatform 获取浏览器/平台 等信息

callApp.getPlatform()

Need TODO

  • 微信内部唤醒App
  • 唤醒小程序
  • 各平台兼容处理

参考

  1. 常用的 URL Scheme