This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moment from 'moment'; | |
import { capitalize } from './helpers'; | |
// Data comes directly from react-native-camera onGoogleVisionBarcodesDetected method | |
export function extractColDocumentData(data) { | |
const dataArray = data.barcodes[0].data.replace(/[^A-Za-z0-9+]+/g, ' ').split(' '); | |
let indexMod = 0; | |
let idNumber; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |