1.0.4 • Published 7 years ago

swipetrack-barcode-scan-listener v1.0.4

Weekly downloads
10
License
MIT
Repository
github
Last release
7 years ago

SwipeTrack Barcode Scan Listener

Listen for SwipeTrack barcode scan events in the browser.

Usage

npm i swipetrack-barcode-scan-listener --save
import swiptrackBarcodeScanListener from 'swipetrack-barcode-scan-listener';

const removeScanListener = swiptrackBarcodeScanListener.onScan({
  barcodePrefix: 'L%',
  barcodeValueTest: /^123.*$/,
}, function (barcode) {
  console.log(barcode);
});

// Now, scanning a barcode 'L%123abc' will log '123abc'
removeScanListener()

Contributing

This module is written in ES2015 and converted to node-friendly CommonJS via Babel.

To compile the src directory to build:

npm run build

Deploying a new version

npm version [major|minor|patch]
npm run build
npm publish build # publish the build directory instead of the main directory
git push --follow-tags # update github
1.0.4

7 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago