@ch4mpy/ng-bt-scan

Tiny lib to capture text from Bluetooth barcode readers detected as keyboard. Eyoyo devices behave like that by default and are more configurable than enough.

Usage no npm install needed!

<script type="module">
  import ch4mpyNgBtScan from 'https://cdn.skypack.dev/@ch4mpy/ng-bt-scan';
</script>

README

NgBtScan

Tiny lib to capture text from Bluetooth barcode readers detected as keyboard. Eyoyo devices behave like that by default and are more configurable than enough.

Usage

  • configure device with prefix and suffix such as respectively $can$ and Enter (later will match "Enter" key)
  • configure BtScanService with the prefix and suffix set on the device
  • subscribe to scan$ Observable

Code scaffolding

Run ng generate component component-name --project ng-bt-scan to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project ng-bt-scan.

Note: Don't forget to add --project ng-bt-scan or else it will be added to the default project in your angular.json file.

Build

Run ng build ng-bt-scan to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build ng-bt-scan, go to the dist folder cd dist/ng-bt-scan and run npm publish.

Running unit tests

Run ng test ng-bt-scan to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.