Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

barcodejs

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

barcodejs

Fast barcode generator for javascript.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-53.85%
Maintainers
1
Weekly downloads
 
Created
Source

Barcode.js

Logo

Build Status npm version

⚠️ Currently not ready for production usage!

Although we use this in production, we do so in a controlled environment usage only text sources we completely control. Expect APIs to change until this notice is removed. (We will however respect semantic versioning.)

Encode strings into an intermediate representation and render them to different output formats.

The primary focus of this project is to be fast and have a low footprint, while being reliable.

Usage

Install via yarn

$ yarn add barcodejs

Or install via npm

$ npm install --save barcodejs

Create an SVG barcode

import {encodeCode39, renderBarcodeToSVG} from "barcodejs"
// common-js
// const {encodeCode39, renderBarcodeToSVG} = require("barcodejs")

const svg = renderBarcodeToSVG(encodeCode39("HELLO WORLD"), {
    // Optional
    width: "100%",
    height: "20mm",
})

console.log(svg)

Support

Supported barcode types:

  • Code39

Supported output formats:

  • SVG
  • HTML + CSS

Features

  • No dependencies
  • The SVG is resizable via standard css or html width / height attributes (including % of the container).

Caveats

  • Currently work in progress
    • No validation of input strings
    • Limited barcode type support
    • No documentation 🙄

FAQs

Package last updated on 23 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc