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

incu-webview

v1.0.12

Published

iNCU Webview 库,用于实现一些与原生端的交互操作。

Readme

iNCU-Webview操作库

安装

版本一定要用@latest,确保每次构建都能拿到最新版

npm i incu-webview@latest --save

引用

ES6:

import Miracle from 'incu-webview'

浏览器:

<script src="node_modules/incu-webview/miracle.min.js"></script>
<script>
  console.log(window.Miracle)
</script>

调试

  1. 首先,在 云家园 的 iNCU 板块的toolbox中,加入你的项目。(只有管理员可以)
  2. 下载 iNCU 测试版
  3. 在校园生活中,进入网页,安卓/iOS 均使用数据线连接到电脑
  4. Android: 使用 chrome://inspect 调试
  5. iOS:使用 safari 调试,看第二步和第四步就行,教程:http://www.saitjr.com/ios/ios-user-safari-debug-webview.html
  6. incu-webview 在全局的变量是 Miracle

板块:

API

isApp

Demo:

import Miracle from 'incu-webview'

const isApp = Miracle.isApp()
console.log(isApp)

onAppReady

用于监听App的加载,加载完成后会调用回调。
除 isApp 外,其他所有Api需在AppReady后才能调用

参数与类型

onAppReady: (callback?: Function) => void

Demo:

import Miracle from 'incu-webview'

const onAppReady = Miracle.onAppReady(() => {
  console.log(Miracle.getData())
})

getData

获取App端的数据,具体格式,看数据吧……,请灵活使用该方法 =。=

Demo:

import Miracle from 'incu-webview'

console.log(Miracle.getData())

call

安全起见,具体能调用的方法查看 iNCU 的文档

参数与类型:

call: (
  baseClass: string,
  method: string,
  params: any,
  success?: Function,
  fail?: Function
) => void

Demo:

import Miracle from 'incu-webview'

Miracle.call('router', 'refresh', {
  title: 'Hello World'
}, () => {
  console.log('set Title success')
}, () => {
  console.log('set Title failed')
})