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

launch-app-lib

v1.0.5

Published

launch app in webview

Readme

launch-app-lib

launch-app-lib 是一个在 H5 唤起 APP 的解决方案

在使用过程中,如有bug请提issue,我会及时跟进。有更好的解决方案欢迎讨论。

Install

Install with npm:

$ npm install --save launch-app-lib

Usage

const LaunchApp = require('launch-app-lib');

or;

import LaunchApp from 'launch-app-lib';
const config = {
  scheme: {
    url: 'scheme://host/path'
  },
  intent: {
    path: 'scan/',
    scheme: 'zxing',
    packageName: 'com.google.zxing.client.android',
    fallbackUrl: 'https://dl.yzcdn.cn/koudaitong.apk'
  },
  universal: {
    url: 'https://host/path'
  },
  yingyongbao: '',
  itunes: '',
  apk: ''
};

const launchApp = new LaunchApp(config);

const params = {
  url: 'https://xxx/xxx',
  id: 123
};
launchApp.launch(params);

launchApp.getScheme(params);
// scheme://host/path?url=https://xxx/xxx&id=123

launchApp.getIntent(params);
// intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;S.url=https://xxx/xxx;l.id=123;S.browser_fallback_url=https%A%F%Fitunes.apple.com%Fcn%Fapp%Fid880579403;end

launchApp.getUniversalLink(params);
// https://host/path?url=https://xxx/xxx&id=123

config

| 参数 | 说明 | 类型 | 是否必须 | | ----------- | --------------------- | ---------------- | -------- | | scheme | APP scheme 信息 | object | 是 | | intent | APP intent 信息 | object | 是 | | universal | APP universal 信息 | object | 是 | | yingyongbao | APP 应用宝地址 | string | 是 | | itunes | APP 的 App Store 地址 | string | 是 | | apk | APP 的 apk 下载地址 | string | 是 | | timeout | 唤起 APP 超时时间 | number or string | 否 | | intentNotSupportedBrowserList | 不支持intent唤起的ua关键字名单(针对国产手机自带浏览器) | array | 否 |

scheme

| 参数 | 说明 | 类型 | 是否必须 | | ---- | ------------------------------- | ------ | -------- | | url | scheme url "scheme://host/path" | string | 是 |

intent

eg:

intent:
   //scan/
   #Intent;
      package=com.google.zxing.client.android;
      scheme=zxing;
   end;

| 参数 | 说明 | 类型 | 是否必须 | | ----------- | ------------------------------------------ | ------ | -------- | | path | intent path "scan/" | string | 是 | | scheme | scheme "zxing" | string | 是 | | packageName | APP 包名 "com.google.zxing.client.android" | string | 是 | | fallbackUrl | 唤起失败降级访问 url | string | 是 |

universal

| 参数 | 说明 | 类型 | 是否必须 | | ---- | ------------- | ------ | -------- | | url | universal url | string | 是 |

Method

launch

唤起 APP 方法

| 参数 | 说明 | 类型 | 是否必须 | | ------------ | ------------------------------------------------------------------------- | ------ | -------- | | params | 启动 APP 参数,用于拼接到对应的启动 url 中 "scheme://host/path?key=value" | object | 是 | | failCallback | 指定启动失败后的回调函数 | fun | 否 |

getScheme

获取 Scheme url

| 参数 | 说明 | 类型 | 是否必须 | | ------ | ------------------------------------------ | ------ | -------- | | params | 启动 APP 参数,用于拼接到对应的启动 url 中 | object | 是 |

getIntent

获取 Scheme url

| 参数 | 说明 | 类型 | 是否必须 | | ------ | ------------------------------------------ | ------ | -------- | | params | 启动 APP 参数,用于拼接到对应的启动 url 中 | object | 是 |

getUniversalLink

获取 Scheme url

| 参数 | 说明 | 类型 | 是否必须 | | ------ | ------------------------------------------ | ------ | -------- | | params | 启动 APP 参数,用于拼接到对应的启动 url 中 | object | 是 |