All Projects → Sleavely → Bark-JS

Sleavely / Bark-JS

Licence: other
🔬 Parse barcode inputs 🏷️ in a unified GS1-128 format 📦🌐

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Bark-JS

SwiftGS1Barcode
A GS1 Barcode Library and Parser in Swift
Stars: ✭ 22 (+22.22%)
Mutual labels:  barcode, gs1
barcode-java
Java Barcode Image Generation Library
Stars: ✭ 18 (+0%)
Mutual labels:  barcode, barcodes
dart barcode
Barcode generation library
Stars: ✭ 79 (+338.89%)
Mutual labels:  barcode, barcodes
biip
📦 Biip interprets the data in barcodes.
Stars: ✭ 19 (+5.56%)
Mutual labels:  gs1, barcodes
Efqrcode
A better way to operate QR Code in Swift, support iOS, macOS, watchOS and tvOS.
Stars: ✭ 4,121 (+22794.44%)
Mutual labels:  barcode, barcodes
React Barcode
A <Barcode/> component for use with React.
Stars: ✭ 210 (+1066.67%)
Mutual labels:  barcode
Qrcoder
A pure C# Open Source QR Code implementation
Stars: ✭ 2,794 (+15422.22%)
Mutual labels:  barcode
Escpos Thermalprinter Android
Useful library to help Android developpers to print with (Bluetooth, TCP, USB) ESC/POS thermal printer.
Stars: ✭ 204 (+1033.33%)
Mutual labels:  barcode
Flutter barcode scanner
Barcode scanner plugin for flutter. Supports barcode scanning for Android and iOS
Stars: ✭ 194 (+977.78%)
Mutual labels:  barcode
android-zbar-sdk
🔗 android-zbar-sdk, provide jni source, so file and jar file used alone, gradle/maven remote dependencies.
Stars: ✭ 311 (+1627.78%)
Mutual labels:  barcode
barcode.flutter
barcode generate library for Flutter
Stars: ✭ 58 (+222.22%)
Mutual labels:  barcode
FoxBarcode
A 100% Visual FoxPro class that provides a tool for generating images with different bar code symbologies to be used in VFP forms and reports, or exported to other applications
Stars: ✭ 31 (+72.22%)
Mutual labels:  barcodes
React Native Barcode Mask
A barcode and QR scan layout for react-native applications with customizable styling
Stars: ✭ 230 (+1177.78%)
Mutual labels:  barcode
barcode-detector
Spec compliant polyfill of the Barcode Detection API 🤳
Stars: ✭ 31 (+72.22%)
Mutual labels:  barcode
laravel-barcode-generator
Generate multiple barcode in Laravel as well as in core PHP for your project, Very easy to install and easy to manage, no difficulties or no complexities for use, keep always smile. :)
Stars: ✭ 17 (-5.56%)
Mutual labels:  barcode
Quagga2
An advanced barcode-scanner written in Javascript and TypeScript - Continuation from https://github.com/serratus/quaggajs
Stars: ✭ 198 (+1000%)
Mutual labels:  barcode
ZZYQRCode
a scanner for QRCode barCode 最好用的ios二维码、条形码,扫描、生成框架,支持闪光灯,从相册获取,扫描音效等,高仿微信,微博
Stars: ✭ 124 (+588.89%)
Mutual labels:  barcode
jQuery.EAN13
A jQuery & plain JavaScript library for generating EAN13-barcodes
Stars: ✭ 45 (+150%)
Mutual labels:  barcode
taro-code
Taro Barcode & QRCode
Stars: ✭ 88 (+388.89%)
Mutual labels:  barcode
Python Barcode
㊙️ Create standard barcodes with Python. No external dependencies. 100% Organic Python.
Stars: ✭ 241 (+1238.89%)
Mutual labels:  barcode

Bark JS

npm version Travis Issues

Bark parses GS1-128 barcodes and extracts the catalogued data according to the GS1 General Specifications (PDF). It can also parse other SKU-related formats to convert into GTINs in GS1, such as EAN-13, ITF-14 and UPC-A.

How to use it

npm install bark-js

Examples

Let's pretend we scan the box in this photo.

const bark = require('bark-js')

bark( '015730033004265615171019' )
// returns:
{
  symbology: 'unknown',
  elements: [
    {
      ai: '01',
      title: 'GTIN',
      value: '57300330042656',
      raw: '57300330042656'
    },
    {
      ai: '15',
      title: 'BEST BEFORE or BEST BY',
      value: '2017-10-19',
      raw: '171019'
    }
  ],
  originalBarcode: '015730033004265615171019'
}

If you are going to scan simple barcodes (e.g. UPC-A, EAN-13, ITF-14, etc.) you can set the assumeGtin option to treat shorter barcodes (11-14 digits) as GS1-128 with a GTIN AI:

const bark = require('bark-js')

bark( '09002490100094', { assumeGtin: true } )
// returns:
{
  symbology: 'unknown',
  elements: [
    {
      ai: '01',
      title: 'GTIN',
      value: '09002490100094',
      raw: '09002490100094'
    }
  ],
  originalBarcode: '0109002490100094'
}

Depending on your barcode reader, you may receive FNC characters that arent the <GS> (ASCII 29) character. To set the group separator yourself, pass the fnc option:

const bark = require('bark-js')

bark( '10FRIDGEX0109002490100094', { fnc: 'X' } )
// returns:
{
  symbology: 'unknown',
  elements: [
    {
      ai: '10',
      title: 'BATCH/LOT',
      value: 'FRIDGE',
      raw: 'FRIDGEX'
    },
    {
      ai: '01',
      title: 'GTIN',
      value: '09002490100094',
      raw: '09002490100094'
    }
  ],
  originalBarcode: '10FRIDGEX0109002490100094'
}

Depending on the type of elements in your code, the parsers may append additional fields to such as isoCurrencyCode and amount for your convenience:

const bark = require('bark-js')

bark( '393297817999' )
// returns:
{
  symbology: 'unknown',
  elements: [
    {
      ai: '3932',
      title: 'PRICE',
      value: '978179.99',
      isoCurrencyCode: '978',
      amount: '179.99',
      raw: '97817999'
    }
  ],
  originalBarcode: '393297817999'
}

Contributing

Pull requests to Sleavely/Bark-JS are encouraged and appreciated!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].