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 🙏

© 2024 – Pkg Stats / Ryan Hefner

lefit-base

v1.0.27

Published

## js-bridge

Downloads

30

Readme

乐刻前端插件基础库 lefit-base

js-bridge

jsbridge插件, 对window.LeFitWebViewJavascriptBridge对象代理, 根据挂载情况自动对调用的方法进行管理

特点:

1 隐藏加载过程, 可直接调用callHandler等方法

2 解决了jsbridge在业务代码内生命周期各自调用混乱的问题

实现原理: UC20180930_155814

wx

微信插件:npm引入的wx对象代理至window.wx, 根据挂载情况自动对调用的方法进行管理

特点:

1. 隐藏加载过程, 可直接调用callHandler等方法

2 解决了wx jsdk在业务代码内生命周期各自调用混乱的问题

UC20180930_160617

position

定位插件:统一在app/wechat/h5三种不同环境上调用的方式

  1. 采用对象封装的形式, 并且将属性直接挂载在子实例上, 对vue书写友好(直接保存至data或store中)
  2. 兼容 cookie缓存 fit-city fit-lat fit-lng
  3. 整合腾讯地图逆地址转换服务和乐刻场地接口 可返回更完整的定位信息
  4. 不同环境分别采用不同定位引擎对交互以及精准度友好
  5. 统一经纬度都采用火星坐标系GCJ-02

实现原理(自动判断环境获取经纬度和城市信息, 也可以指定环境):

  • app环境: app获取经纬度 + lefit城市信息接口
  • 微信环境: 微信获取经纬度 + 腾讯接口获取当前街道信息 + lefit城市信息接口
  • 其他浏览器: 高德geoLocation插件 + lefit城市信息接口

** 插件中不集成jsbridge或wxjsdk 如需使用需引入上方两个依赖或自行加载,配置等 **

request

h5/微信小程序/app统一请求框架 

在不同环境下采用同一套代码请求接口

目前仅完成h5部分

详细文档参考 https://github.com/wendux/fly

config

对正式环境 测试环境 uat环境区分判断的h5链接前缀

utils

整合一些h5页面常用的方法 以及 一些在各个环境下统一调用的方法, 如: shareLink openMap setTitle 等