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

codify-node

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codify-node

Generates 1D, 2D, and composite barcodes in png, svg, or eps formats.

  • 1.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34
decreased by-52.78%
Maintainers
1
Weekly downloads
 
Created
Source

Codify

A Node.js module that generates barcode images. Supports 50+ different 1D or 2D symbologies in png, eps, or svg formats.

We have based this package on symbology and are contributing to the code from them.

Introduction

This Node.js module will allow you to generate over 50+ different types of 1D or 2D symbologies, including barcodes for books, grocery, shipping carriers, healthcare, and international codes.

It can create a PNG, SVG, or EPS image file, or return a string containing SVG, PostScript, or base64-encoded PNG data.

Major changes made to this package regards of origin are:

  • fixed version of zint packed up with the package
  • fixed building zint

Documentation

Read the docs →

Quick start

npm add codify-node

Quick Examples

Code 11 Example

import { SymbologyType, createStream } from 'symbology'

(async () => {
  const { data } = await createStream({
    symbology: SymbologyType.CODE11
  }, '8765432164')

  console.log('Result: ', data)
})()

This will log:

{
  "data": "data:image/png+data;base64,PHN [...] eFd==",
  "message": "Symbology successfully created.",
  "code": 0
}

And the base64 PNG generated will look like:

code 11

MaxiCode Example

import { SymbologyType, createFile } from 'symbology'

(async () => {
  const { data } = await createFile({
    symbology: SymbologyType.MAXICODE,
    option1: 2,
    primary: '999999999840012',
    fileName: 'maxiCodeExample.svg'
    showHumanReadableText: false,
  }, 'Secondary Message Here')

  console.log('Result: ', data)
})()

This creates maxiCodeExample.svg which looks like:

MaxiCode

USPS Example

import { SymbologyType, createFile } from 'symbology'

(async () => {
  const { data } = await createFile({
    symbology: SymbologyType.ONECODE
    fileName: 'uspsExample.eps'
  }, '01234567094987654321-01234')

  console.log('Result: ', data)
})()

This creates uspsExample.eps which looks like:

USPS

License

GPL-3.

Keywords

FAQs

Package last updated on 20 Oct 2022

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