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

shareinstall

v1.0.8

Published

shareinstall jssdk插件

Readme

shareinstall jssdk

web 页面集成 shareinstall jssdk

如何使用

# 安装依赖
npm install --save shareinstall

# 引用依赖 选择以下一种方式引用
import ShareInstall from 'shareinstall'; // es6
var ShareInstall = require('shareinstall'); // commonJs

# 初始化
// shareinstall初始化,初始化时将与shareinstall服务器交互,应尽可能早的调用
/* web页面向app传递的json数据(json string/js Object),应用被拉起或是首次安装时,通过相应的android/ios api可以获取此数据 */
var data = ShareInstall.parseUrlParams(); // shareinstall.js中提供的工具函数,解析url中的所有查询参数
new ShareInstall({
  appKey: 'shareinstall为当前应用分配的appkey',
  // 可选项,微信中打开自定义遮罩层
  // shadow: function(){
  //  return "<div id='shareinstall_shadow' style='position:fixed;left:0;top:0;background:rgba(0,255,0,0.5);filter:alpha(opacity=50);width:100%;height:100%;z-index:10000;'></div>"
  // },
  /* 可选参数,是否优先考虑拉起app,以牺牲下载体验为代价 默认true */
  // preferWakeup: true,
  /* 可选参数,唤醒操作的执行时长,超时后将放弃唤醒并执行下载,默认1500,单位是毫秒 */
  // timeout: 1500,
  onready: function() {
    // shareinstall已成功回调
    var m = this, button = document.getElementById("downloadButton");
    button.style.visibility = "visible";

    /* 用户点击某个按钮时(假定按钮id为downloadButton),安装app */
    button.onclick = function() {
      m.wakeupOrInstall();
    }
  }
}, data);

shareinstall 官网

https://www.shareinstall.com.cn

业务咨询

QQ:2881355608

服务热线:021-60893259

备用热线:021-60897780