waybill-parser
v1.0.0
Published
A module to parse waybill using waybill masks
Downloads
2
Readme
Waybill-parser
Usage
const config = {
url: 'http://www.test.com/regex',
user: 'derp',
password: 'derpina'
}
const parser = require('waybill-parser')(config)
parser.applyWaybillMasks('WI000446501', 1)
.then((result) => {
//it should print { waybill: 'WI0004465', parcelId: '01' }
console.log(result)
})
.catch((error) => {
//it will be called if the waybill cannot be parsed
})