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

gpy-lt

v0.0.38

Published

npm install gpy-lt

Downloads

51

Readme

安装

npm install gpy-lt

使用方法

import { GPY } from "gpy-lt"

GPY.openMain(idName); // 打开主摄像头,idName绑定的id

GPY.closeMain(idName); // 关闭主摄像头,idName绑定的id

GPY.openVice(idName); // 打开副摄像头,idName绑定的id

GPY.closeVice(idName); // 关闭副摄像头,idName绑定的id

GPY.rotateVideo(angle); // 旋转摄像头,angle—旋转度数

GPY.mainPhoto(callback); // 主摄像头拍照,示例:

GPY.mainPhoto((res: any) => {
	if (res.data.code === '0') {
        if (res.data.photoBase64) {
            photoimg.value = "data:image/jpg;base64," + res.data.photoBase64;
        }
	}
})

GPY.vicePhoto(callback); // 副摄像头拍照

GPY.openPort(callback); // 打开串口

GPY.closePort(callback); // 关闭串口

GPY.getMainMode(callback); // 加载主摄像头视频模式

GPY.getViceMode(callback); // 加载副摄像头视频模式

GPY.startVideo(callback); // 开始录制视频

GPY.stopVideo(callback); // 结束录制视频

GPY.getAudio(callback); // 获取音频列表

GPY.mainModeRate(value, callback); // 切换主摄像头视频模式,重新加载主摄像头分辨率,此处的value是主摄像头的视频模式,示例:

GPY.mainModeRate(vallue, (res: any) => {
    mainModeRate = res
})

GPY.viceModeRate(value, callback); // 切换副摄像头视频模式,重新加载主摄像头分辨率,此处的value是副摄像头的视频模式

GPY.codeIdentify(callback); // 条码识别

GPY.getBiokey(callback); // 获取指纹

GPY.readIDcard(callback); // 读取身份证,返回:

​ 身份证UID:strIDUID

​ 身份证附加信息:appendMsg

​ 身份证民族代码:nationCode

​ 身份证性别代码:sexCode

​ 身份证有效终止日期:validEnd

​ 身份证有效起始日期:validStart

​ 身份证发卡机构:issueOrgan

​ 身份证号码:cardID

​ 身份证地址:address

​ 身份证生日:birthday

​ 身份证性别:sex

​ 身份证姓名:name

GPY.addPDF(callback); // 拍照并加入PDF队列

GPY.savePDF(callback); // 生成PDF文件

GPY.personAndIDCard(callback); // 人证对比

GPY.OCRIdentify(callback); // OCR识别

GPY.getEquipmentModel(callback); // 获取设备型号

GPY.getSonixserialNo(callback); // 获取设备序列号

GPY.getStatus(callback); // 获取设备状态

GPY.isConnect(callback); // 判断设备是否连接

GPY.ejectModal(callback); // 弹出签字窗口

GPY.getSignPicture(callback); // 获取签名图片