bill-validator
A Node.js library to facilitate the use of bill validators.
Supported Validators
PR are welcome
Getting started
Installation
Using yarn
$ yarn add bill-validator
Using npm
$ npm i --save bill-validator
Usage
'use strict'
const {createApex7000, createSerialInterface} = require('bill-validator')
const main = async () => {
const serialInterface = createSerialInterface({
port: '/dev/ttyUSB0'
, portOptions: {
autoOpen: false
, baudRate: 9600
, dataBits: 7
, parity: 'even'
, stopBits: 1
}
})
const apex7000 = createApex7000({
ioInterface: serialInterface
})
apex7000.onAny((event, value) => {
console.log({[event]: value})
})
await apex7000.start()
apex7000.accept()
}
main()
Contributing
Style
My style is a bit unorthodox and has evolved over 20 years of development. It's not what the cool kids are doing but hey, you might like it!
eslint-config-ayotte
Process
- Write test
- Write code
- Assure that there are not test or lint errors
- Submit PR
License
MIT