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

@sv-print/plugin-ele-bwip-js

v0.2.0

Published

## 安装

Readme

@sv-print/plugin-ele-bwip-js

安装

npm install @sv-print/plugin-ele-bwip-js

使用

sv-print 插件引入的两种方式见:sv-print 插件引入的两种方式:https://www.ibujian.cn/svp/plugin/a02.html

import pluginEleBwip from "@sv-print/plugin-ele-bwip-js";
const plugins = [
  pluginEleBwip({
    barcodeTypeList: [{ title: "EAN-13", value: "ean13" }], // 不传则使用默认值
    qrcodeTypeList: [{ title: "QR Code", value: "qrcode" }], // 不传则使用默认值
  }),
];

默认值

条形码默认值:

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" },
];

二维码默认值:

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" },
];

支持的条码类型和二维码类型

https://github.com/metafloor/bwip-js

  • auspost • AusPost 4 State Customer Code
  • azteccode • Aztec Code
  • azteccodecompact • Compact Aztec Code
  • aztecrune • Aztec Runes
  • bc412 • BC412
  • channelcode • Channel Code
  • codablockf • Codablock F
  • code11 • Code 11
  • code128 • Code 128
  • code16k • Code 16K
  • code2of5 • Code 25
  • code32 • Italian Pharmacode
  • code39 • Code 39
  • code39ext • Code 39 Extended
  • code49 • Code 49
  • code93 • Code 93
  • code93ext • Code 93 Extended
  • codeone • Code One
  • coop2of5 • COOP 2 of 5
  • daft • Custom 4 state symbology
  • databarexpanded • GS1 DataBar Expanded
  • databarexpandedcomposite • GS1 DataBar Expanded Composite
  • databarexpandedstacked • GS1 DataBar Expanded Stacked
  • databarexpandedstackedcomposite • GS1 DataBar Expanded Stacked Composite
  • databarlimited • GS1 DataBar Limited
  • databarlimitedcomposite • GS1 DataBar Limited Composite
  • databaromni • GS1 DataBar Omnidirectional
  • databaromnicomposite • GS1 DataBar Omnidirectional Composite
  • databarstacked • GS1 DataBar Stacked
  • databarstackedcomposite • GS1 DataBar Stacked Composite
  • databarstackedomni • GS1 DataBar Stacked Omnidirectional
  • databarstackedomnicomposite • GS1 DataBar Stacked Omnidirectional Composite
  • databartruncated • GS1 DataBar Truncated
  • databartruncatedcomposite • GS1 DataBar Truncated Composite
  • datalogic2of5 • Datalogic 2 of 5
  • datamatrix • Data Matrix
  • datamatrixrectangular • Data Matrix Rectangular
  • datamatrixrectangularextension • Data Matrix Rectangular Extension
  • dotcode • DotCode
  • ean13 • EAN-13
  • ean13composite • EAN-13 Composite
  • ean14 • EAN-14
  • ean2 • EAN-2 (2 digit addon)
  • ean5 • EAN-5 (5 digit addon)
  • ean8 • EAN-8
  • ean8composite • EAN-8 Composite
  • flattermarken • Flattermarken
  • gs1-128 • GS1-128
  • gs1-128composite • GS1-128 Composite
  • gs1-cc • GS1 Composite 2D Component
  • gs1datamatrix • GS1 Data Matrix
  • gs1datamatrixrectangular • GS1 Data Matrix Rectangular
  • gs1dldatamatrix • GS1 Digital Link Data Matrix
  • gs1dlqrcode • GS1 Digital Link QR Code
  • gs1dotcode • GS1 DotCode
  • gs1northamericancoupon • GS1 North American Coupon
  • gs1qrcode • GS1 QR Code
  • hanxin • Han Xin Code
  • hibcazteccode • HIBC Aztec Code
  • hibccodablockf • HIBC Codablock F
  • hibccode128 • HIBC Code 128
  • hibccode39 • HIBC Code 39
  • hibcdatamatrix • HIBC Data Matrix
  • hibcdatamatrixrectangular • HIBC Data Matrix Rectangular
  • hibcmicropdf417 • HIBC MicroPDF417
  • hibcpdf417 • HIBC PDF417
  • hibcqrcode • HIBC QR Code
  • iata2of5 • IATA 2 of 5
  • identcode • Deutsche Post Identcode
  • industrial2of5 • Industrial 2 of 5
  • interleaved2of5 • Interleaved 2 of 5 (ITF)
  • isbn • ISBN
  • ismn • ISMN
  • issn • ISSN
  • itf14 • ITF-14
  • japanpost • Japan Post 4 State Customer Code
  • kix • Royal Dutch TPG Post KIX
  • leitcode • Deutsche Post Leitcode
  • mailmark • Royal Mail Mailmark
  • mands • Marks & Spencer
  • matrix2of5 • Matrix 2 of 5
  • maxicode • MaxiCode
  • micropdf417 • MicroPDF417
  • microqrcode • Micro QR Code
  • msi • MSI Modified Plessey
  • onecode • USPS Intelligent Mail
  • pdf417 • PDF417
  • pdf417compact • Compact PDF417
  • pharmacode • Pharmaceutical Binary Code
  • pharmacode2 • Two-track Pharmacode
  • planet • USPS PLANET
  • plessey • Plessey UK
  • posicode • PosiCode
  • postnet • USPS POSTNET
  • pzn • Pharmazentralnummer (PZN)
  • qrcode • QR Code
  • rationalizedCodabar • Codabar
  • raw • Custom 1D symbology
  • rectangularmicroqrcode • Rectangular Micro QR Code
  • royalmail • Royal Mail 4 State Customer Code
  • sscc18 • SSCC-18
  • swissqrcode • Swiss QR Code
  • symbol • Miscellaneous symbols
  • telepen • Telepen
  • telepennumeric • Telepen Numeric
  • ultracode • Ultracode
  • upca • UPC-A
  • upcacomposite • UPC-A Composite
  • upce • UPC-E
  • upcecomposite • UPC-E Composite

License

LGPL

开源使用须知

1.请自觉遵守 LGPL 协议,其他用途可联系作者;

2.允许用于个人学习、毕业设计、教学案例、公益事业、商业使用;

3.如果商用必须保留版权信息,请自觉遵守;

4.禁止将本开源的代码和资源进行任何形式任何名义的出售,否则产生的一切任何后果责任由侵权者自负;

5.商用请仔细审查代码和漏洞,不得用于任一国家许可范围之外的商业应用,产生的一切任何后果责任自负;