1.0.1 • Published 4 years ago

barcode-event v1.0.1

Weekly downloads
24
License
-
Repository
github
Last release
4 years ago

Barcode Event

Barcode Event is an event-driven, framework-agnostic library capturing barcode input as simulated keystrokes, TypeScript supported

To build Barcode Event

npm i
npm run-script build

To start using Barcode Event

Simply place the .js script just built to the HTML <head> tag, check out examples

Prerequisites

  • Occupied window.barcodeEvent

Event name

barcodeEvent.ON_BARCODE_SCANNED

To listen the barcode-scanned event in a React component

componentDidMount() {
    window.addEventListener(barcodeEvent.ON_BARCODE_SCANNED, e => {
        // the barcode in in e.detail, do anything you want.
    });
}

Finally

Please help if you find bugs or want to test it, thanks!

1.0.1

4 years ago

1.0.0

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago

0.0.2

4 years ago

0.0.0

4 years ago