This file contains hidden or 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
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
// Generated by CoffeeScript 1.10.0 | |
var barcodeScanListener; | |
barcodeScanListener = require('barcode-scan-listener'); | |
/* | |
Listen for scan with specified product prefix. | |
@param [Function] onScan - callback to call when scan is successful. Passes the scanned string. |
This file contains hidden or 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
/** | |
* | |
*Code to flatten multidimensional array in javascript | |
* | |
*/ | |
function flatten(array) { | |
return JSON.parse("[" + | |
JSON.stringify(array) | |
.replace(/[\[\]]+/g, "") | |
.replace(/,,/g, ",") + |