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

gtjsbridge

v1.1.1

Published

绿城App开放平台

Downloads

21

Readme

绿城APP 开放平台

使用

install

npm install gtjsbridge -S

项目中如何使用

demo

import JSBridge from 'gtjsbridge';

const bridge = new JSBridge();
const callAppLogin = bridge.invokeNative('Home', 'callAppLogin');
callAppLogin({ key: value, key: value }, (res) => {
    // do work
});

@ invokeNative(module, method) 1. 第一个参数为调用的方法属于原生的哪一个模块 2. 第二个参数为通知原生调用的方法名

@ callAppLogin(args, callback) 1. 第一个参数为传递给原生的参数 2. 第二个参数为回调,原生返回的数据

API

通用

  • invokeNative(module, method)

| 参数 | 类型 | 是否必需 | 示例值 | 说明 | | -------- | -----: | :----: | -----: | :----: | | module | string | 是 | Home | 调用的方法属于原生的哪一个模块, 如果没有传''| | method | string | 是 | getLogin | 通知原生调用的方法名|

  • XXXXX(args, callback)

| 参数 | 类型 | 是否必需 | 示例值 | 说明 | | -------- | -----: | :----: | -----: | :----: | | args | object | 否 | {title: '标题'} | 传递给原生的参数| | callback | function| 否 | | 回调,原生返回的数据|

比如demo中使用的 callAppLogin(args, callback)

方法名

  • 登录: callAppLogin
  • 分享: callAppShare
  • 获取地理位置: getAppLocation
  • App如何退出浏览器,返回原生界面,将此页面出栈: popAppWebPage
  • 通知app关闭定位: stopAppLocation
  • 通知原生跳转到帖子列表: callToPostList
  • 通知原生跳转到活动列表: callToActivityList
  • 通知原生跳转到用户完善个人信息: callToPerfectUserInfo
  • 通知原生新开一个webView: callPushWebView

请点击查看更多方法名