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

dr-vue-ble

v0.2.0

Published

ble

Downloads

3

Readme

dr-vue-ble

ble

Install

npm install dr-vue-ble
npx cap sync

API

SNBC 打印机桥梁

打印时参数:

const qr:any = {
 type: 2, // 打印类型 1 1d 2 二维码 3 文字
 x: 0, //	横坐标,单位点。
 y: 0, //	纵坐标,单位点。
 data: 'No12365574892145', // 内容
 eCCLever: "M", //	安全级别。'H'表示极高可靠性级别, 'Q'表示高可靠性级别, 'M'表示标准级别, 'L'表示高密度级别
 cellWidth: 80, //		模块宽度。
 model: 2, //	条码模式, 1为原始模式,2为增强模式
};
const oneD:any = {
 type: 1, // 打印类型 1 1d 2 二维码 3 文字
 x: 160, //	横坐标,单位点。
 y: 0, //	纵坐标,单位点。
 data: '0023695', // 内容
 rotation: 0,// 0 0度,1 90,2 180, 3 270
 height: 80, //	条码高度,单位:点。
 narrowbarWidth: 3, //	窄条宽度,单位:点。
 wideBarwidth: 6, //	宽条宽度,单位:点。
};
const textArea:any = {
 type: 3, // 打印类型 1 1d 2 二维码 3 文字
 x: 0, //	起始区域横坐标,单位点。
 y: 160, //	起始区域纵坐标,单位点。
 x2: 600, // 结束区域横坐标,单位点。 自动换行为宽
 y2: 480, // 结束区域纵坐标,单位点。 自动换行为高
 data: '测试一段文字。。。。。。。。测试一段文字。。。。。。。。测试一段文字。。。。。。。。测试一段文字。。。。。。。。测试一段文字。。。。。。。。', // 内容
 area: 0, //  选择0居左、2局右或1居中
 fontSize: 24, //	窄条宽度,单位:点。
 bold: 0, //	当设置1时,字体加粗;设置为0时,字体不加粗
 Reverse: 0, //当设置1时,打印方式黑底白字;设置为0时,打印方式为白底黑字
 wrap: 1,  // 自动换行为 1
 lineSpace: 1
};
const page: {width: number, hight: number, item: any[]} = {
 width: 600, // 布局宽
 hight: 800, // 布局高
 item: [ ]
}

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>

测试

| Param | Type | | ------------- | ------------------------------- | | options | { value: string; } |

Returns: Promise<{ value: string; }>


getConnectedDevices(...)

getConnectedDevices(options: { value: string; }) => Promise<{ value: any; }>

获取已连接设备

| Param | Type | | ------------- | ------------------------------- | | options | { value: string; } |

Returns: Promise<{ value: any; }>


connect(...)

connect(options: { address: string; }) => Promise<{ code: any; }>

连接新北洋打印机

| Param | Type | | ------------- | --------------------------------- | | options | { address: string; } |

Returns: Promise<{ code: any; }>


isConnect(...)

isConnect(options: { address: string; }) => Promise<{ code: any; }>

判断蓝牙是否打开

| Param | Type | | ------------- | --------------------------------- | | options | { address: string; } |

Returns: Promise<{ code: any; }>


printer(...)

printer(options: { value: string; }) => Promise<{ code: any; }>

打印

| Param | Type | | ------------- | ------------------------------- | | options | { value: string; } |

Returns: Promise<{ code: any; }>


getStatus()

getStatus() => Promise<{ code: any; }>

获取打印机状态

Returns: Promise<{ code: any; }>


disconnect()

disconnect() => Promise<{ code: any; }>

断开

Returns: Promise<{ code: any; }>


getMacAddress()

getMacAddress() => Promise<{ address: any; }>

获取mac地址

Returns: Promise<{ address: any; }>