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

@vg-print/plugin-bwip-js

v0.1.2

Published

bwip-js 条形码/二维码插件

Readme

@vg-print/plugin-bwip-js

基于 bwip-js 的条形码/二维码插件。

安装

npm install @vg-print/plugin-bwip-js

使用

import pluginEleBwip from '@vg-print/plugin-bwip-js'

const plugins = [
  pluginEleBwip({
    barcodeTypeList: [{ title: 'EAN-13', value: 'ean13' }],
    qrcodeTypeList: [{ title: 'QR Code', value: 'qrcode' }]
  })
]

不传则使用默认值。

默认值

条形码默认值:

import type { BarcodeItem } from '@vg-print/plugin-bwip-js'

const DEFAULT_BARCODE_LIST: BarcodeItem[] = [
  // 零售商品码
  { title: '零售商品码', group: true },
  { title: 'EAN-13', value: 'ean13' },
  { title: 'EAN-8', value: 'ean8' },
  { title: 'UPC-A', value: 'upca' },
  { title: 'UPC-E', value: 'upce' },
  { title: 'ISBN', value: 'isbn' },
  { title: 'ISMN', value: 'ismn' },
  { title: 'ISSN', value: 'issn' },
  // 通用一维条码
  { title: '通用一维条码', group: true },
  { title: 'Code 128', value: 'code128' },
  { title: 'Code 39', value: 'code39' },
  { title: 'Code 39 Extended', value: 'code39ext' },
  { title: 'Code 93', value: 'code93' },
  { title: 'Code 93 Extended', value: 'code93ext' },
  { title: 'Codabar', value: 'rationalizedCodabar' },
  { title: 'Interleaved 2 of 5 (ITF)', value: 'interleaved2of5' },
  { title: 'MSI Plessey', value: 'msi' },
  { title: 'Telepen', value: 'telepen' },
  { title: 'Telepen Numeric', value: 'telepennumeric' },
  { title: 'Plessey UK', value: 'plessey' },
  { title: 'PosiCode', value: 'posicode' },
  // 物流编码
  { title: '物流编码', group: true },
  { title: 'EAN-14', value: 'ean14' },
  { title: 'GS1-128', value: 'gs1-128' },
  { title: 'ITF-14', value: 'itf14' },
  { title: 'SSCC-18', value: 'sscc18' },
  // 邮政编码
  { title: '邮政编码', group: true },
  { title: 'Australia Post', value: 'auspost' },
  { title: 'Deutsche Post Identcode', value: 'identcode' },
  { title: 'Deutsche Post Leitcode', value: 'leitcode' },
  { title: 'Japan Post', value: 'japanpost' },
  { title: 'Royal Mail 4 State', value: 'royalmail' },
  { title: 'Royal Mail Mailmark', value: 'mailmark' },
  { title: 'Royal TNT Post (KIX)', value: 'kix' },
  { title: 'USPS Intelligent Mail', value: 'onecode' },
  { title: 'USPS PLANET', value: 'planet' },
  { title: 'USPS POSTNET', value: 'postnet' },
  { title: 'USPS FIM', value: 'symbol' },
  // 医疗产品编码
  { title: '医疗产品编码', group: true },
  { title: 'Italian Pharmacode', value: 'code32' },
  { title: 'Pharmaceutical Binary Code', value: 'pharmacode' },
  { title: 'Pharmazentralnummer (PZN)', value: 'pzn' },
  { title: 'Two-track Pharmacode', value: 'pharmacode2' },
  { title: 'HIBC Code 128', value: 'hibccode128' },
  { title: 'HIBC Code 39', value: 'hibccode39' },
  { title: 'HIBC Codablock F', value: 'hibccodablockf' },
  { title: 'HIBC PDF417', value: 'hibcpdf417' },
  { title: 'HIBC MicroPDF417', value: 'hibcmicropdf417' },
  // GS1 DataBar
  { title: 'GS1 DataBar', group: true },
  { title: '全向式 GS1 DataBar', value: 'databaromni' },
  { title: '截短式 GS1 DataBar', value: 'databartruncated' },
  { title: '限定式 GS1 DataBar', value: 'databarlimited' },
  { title: '扩展式 GS1 DataBar', value: 'databarexpanded' },
  { title: '层排式 GS1 DataBar', value: 'databarstacked' },
  { title: '全向层排式 GS1 DataBar', value: 'databarstackedomni' },
  { title: '层排扩展式 GS1 DataBar', value: 'databarexpandedstacked' },
  { title: 'GS1 北美优惠券码', value: 'gs1northamericancoupon' },
  // 堆叠式条码
  { title: '堆叠式条码', group: true },
  { title: 'PDF417', value: 'pdf417' },
  { title: 'MicroPDF417', value: 'micropdf417' },
  { title: 'Codablock F', value: 'codablockf' },
  { title: 'Code 16K', value: 'code16k' },
  { title: 'Code 49', value: 'code49' },
  // 复合编码
  { title: '复合编码', group: true },
  { title: '复合 EAN-13', value: 'ean13composite' },
  { title: '复合 EAN-8', value: 'ean8composite' },
  { title: '复合 UPC-A', value: 'upcacomposite' },
  { title: '复合 UPC-E', value: 'upcecomposite' },
  { title: '复合 GS1-128', value: 'gs1-128composite' },
  { title: '全向式复合 GS1 DataBar', value: 'databaromnicomposite' },
  { title: '截短式复合 GS1 DataBar', value: 'databartruncatedcomposite' },
  { title: '限定式复合 GS1 DataBar', value: 'databarlimitedcomposite' },
  { title: '扩展式复合 GS1 DataBar', value: 'databarexpandedcomposite' },
  { title: '层排式复合 GS1 DataBar', value: 'databarstackedcomposite' },
  { title: '全向层排式复合 GS1 DataBar', value: 'databarstackedomnicomposite' },
  { title: '层排扩展式复合 GS1 DataBar', value: 'databarexpandedstackedcomposite' },
  // 附加组件
  { title: '附加组件', group: true },
  { title: 'EAN-2 (2 位附加码)', value: 'ean2' },
  { title: 'EAN-5 (5 位附加码)', value: 'ean5' },
  { title: 'GS1 复合 2D 组件', value: 'gs1-cc' },
  // 不常用编码
  { title: '不常用编码', group: true },
  { title: 'Code 11', value: 'code11' },
  { title: 'Code 2 of 5', value: 'code2of5' },
  { title: 'Code One', value: 'codeone' },
  { title: 'BC412', value: 'bc412' },
  { title: 'COOP 2 of 5', value: 'coop2of5' },
  { title: 'Channel Code', value: 'channelcode' },
  { title: 'Datalogic 2 of 5', value: 'datalogic2of5' },
  { title: 'IATA 2 of 5', value: 'iata2of5' },
  { title: 'Matrix 2 of 5', value: 'matrix2of5' },
  // 实验编码
  { title: '实验编码', group: true },
  { title: 'MaxiCode', value: 'maxicode' },
  { title: 'DotCode', value: 'dotcode' },
  { title: 'Raw', value: 'raw' },
  { title: 'Custom 4 state symbology', value: 'daft' },
  { title: 'Flattermarken', value: 'flattermarken' }
]

二维码默认值:

import type { BarcodeItem } from '@vg-print/plugin-bwip-js'

const DEFAULT_QRCODE_LIST: BarcodeItem[] = [
  { title: 'QR 码', group: true },
  { title: 'QR Code', value: 'qrcode' },
  { title: 'Micro QR Code', value: 'microqrcode' },
  { title: 'Swiss QR Code', value: 'swissqrcode' },
  { title: 'Rectangular Micro QR Code', value: 'rectangularmicroqrcode' },
  { title: 'GS1 QR Code', value: 'gs1qrcode' },
  { title: 'HIBC QR Code', value: 'hibcqrcode' },
  { title: 'Aztec 码', group: true },
  { title: 'Aztec Code', value: 'azteccode' },
  { title: 'Aztec Runes', value: 'aztecrune' },
  { title: 'Compact Aztec Code', value: 'azteccodecompact' },
  { title: 'HIBC Aztec Code', value: 'hibcazteccode' },
  { title: 'Data Matrix', group: true },
  { title: 'Data Matrix', value: 'datamatrix' },
  { title: 'Data Matrix Rectangular', value: 'datamatrixrectangular' },
  { title: 'GS1 Data Matrix', value: 'gs1datamatrix' },
  { title: 'GS1 Data Matrix Rectangular', value: 'gs1datamatrixrectangular' },
  { title: 'HIBC Data Matrix', value: 'hibcdatamatrix' },
  { title: 'HIBC Data Matrix Rectangular', value: 'hibcdatamatrixrectangular' },
  { title: '其他二维码', group: true },
  { title: '汉信码', value: 'hanxin' },
  { title: 'DotCode', value: 'dotcode' }
]