You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

boardingbarcode

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boardingbarcode

Generate an svg of a boarding pass barcode.

2.0.2
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

boardingbarcode

Generate an SVG boarding pass barcode using Nodejs.

Example

const barcode = require('boardingbarcode');

//Generate barcode
/**
 * boardingType: 0 AZTEC or 1 PDF417
 * boardingPassSize: 0-100
 * text: Boarding pass text config
 */
//barcode(boardingType, text, errorCorrection, boardingPassSize)
barcode(1, 6, {
    firstName: 'Carlos',
    lastName: 'Martin',
    PNR: 'XYZ123',
    from: 'HNL',
    to: 'LAX',
    flightOperator: 'HA',
    flightNumber: '123',
    date: '10/30/2017',
    class: 'F0', //FirstClass
    seat: '35A',
    boardingIndex: '0001'  
}).then(svg => {
    console.log(svg);
});

Keywords

boardingpass

FAQs

Package last updated on 30 Apr 2019

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