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

@clgg/clgg-js-bridge

v1.4.1

Published

clgg

Readme

clgg-js-bridge

NPM version NPM downloads

车轮滚滚 APP 提供的 JS 桥接 api,用于 嵌入的 H5 调用车轮滚滚 app 的一些原生功能。

安装

$ npm install clgg-js-bridge

使用

//示例判断页面是否嵌入在APP中
import { isInApp } from "clgg-js-bridge";

if (isInApp()) {
  //在
} else {
  //不在
}

函数列表

| 函数 | 调用说明 | 说明 | | --------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | isInApp | ()=>boolen | 判断 H5 是否在车轮滚滚 app 中 | | isInAndriodApp | ()=>boolen | 判断 H5 是否在车轮滚滚 app andriod 版本 中 | | isInIosApp | ()=>boolen | 判断 H5 是否在车轮滚滚 app Ios 版本 中 | | goLogin | ()=>void | 跳转到原生登录页面 | | showTitle | (title:string)=>void | 调用原生页面 title | | hideTitle | ()=>void | 隐藏 原生页面 title | | shareLink | (title: string,content: string,shareUrl: string,friendsCircle: 0 或 1)=>void | 分享链接 friendsCircle 参数:0:好友;1:朋友圈 | | navigateToAppPage | (pageNum: number)=>void | 跳转到原生的指定页面 参数:0:管车专家;1:ETC;2:运输软件;3:财税管理;4:金融;5:商城首页 | | clearAppToken | ()=>void | 清除 apptoken | | getToken | ()=>void | 获取 token | | gesture | (type: number)=>void | //开启/禁用手势返回上一页(type===0 关,type===1 开) | | getCurrentVersionCode | () => number | 获取版本号 | | getStatusBarHeight | ()=>number | 获取手机状态栏高度 | | getUserInfoFromApp | ()=>any | 获取用户信息 | | goBack | ()=>void | 返回上一页 | | jumpPersonal | ()=>void | 跳 App 个人中心页面 | | shareImage | (blob:string,friendsCircle:0 | 1)=>void | 分享链接 friendsCircle 参数:0:好友;1:朋友圈 | | clearAppCache | ()=>void | 清除 webview 缓存 |