mvayngrib / parse-usdl Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi everyone i'm seeing the following issue when the first name (or any other value) contains a key name, like for example ADAN
which contains DAN
key, then the name parsed is the following response:
{
"documentNumber": "xxxxxx",
"lastName": "MANTILLA",
"lastNameTruncated": "N",
"firstName": "A",
"firstNameTruncated": "N",
"middleName": "ELIECER",
"middleNameTruncated": "N",
"jurisdictionVehicleClass": "C",
"jurisdictionRestrictionCodes": "01",
"jurisdictionEndorsementCodes": "NONE",
"dateOfIssue": "06/01/2018",
"dateOfBirth": "06/03/1987",
"dateOfExpiry": "06/03/2022",
"sex": "M",
"height": "064 IN",
"eyeColor": "GRN",
"addressStreet": "xxxxx",
"addressCity": "xxxx",
"complianceType": "N",
"addressPostalCode": "xxxxxxx",
"documentDiscriminator": "xxxxxx",
"issuer": "USA",
"weightLb": "130",
"hairColor": "BRO",
"inventoryControlNumber": "xxxxxx"
}
Do you guys know how to handle this race cases ?
Florida drivers licenses can contain a ZFB element, which doesn't appear to be supported.
I've researched a lot and couldn't find any free libraries that do that, only paid ones like https://github.com/dynamsoft-dbr.
Could you provide any guidance with that?
Thanks!
It seems the format for the codes of the new drivers license in California (expire in 2023 instead of 2020) have changed a bit. The drivers license number seems to be located under DCK, previously it was located under DAQ. I made an quick and dirty adjustment to the parseUsdl.js
file to accommodate for this in my local environment:
Under line 22:
/////////////////////////////////////////////
// Switch values if true, of value and key //
/////////////////////////////////////////////
if (isNewDl(code, line)) value = line.slice(8, 16), key = 'documentNumber'
Under line 43:
/////////////////////////////
// Determine if DCK code's //
// key is documentNumber //
/////////////////////////////
const isNewDl = (code, line) => (code === "DCK" && line.slice(0, 8).match('DCK[0-9][0-9][0-9][0-9][0-9]') !== null)
Just wanted to bring attention to this.
Ontario driver's licenses include the DCT
field, which is where the first name is placed. This library is missing that field and errors out on Ontario licenses. It should be an easy fix.
I'm working with the L-Tron LTC4910 scanner in the USB Keyboard mode. When scanning a driver's license I get a string formatted as below:
@ ANSI 636024070001DL00310247DLDAQ12345678DCSDOEDDENDACJANEDDFNDADCDDGUDCADDCBNONEDCDNONEDBD02012018DBB01011940DBA01012022DBC2DAU070 inDAYHAZDAG10 SOME STREETDAICITYDAJVTDAK123450000 DCF123451234544DCGUSADAW170DAHNONEDDAFDDB02202013DDK1
The only new line characters are after the @
and ANSI
. If I manually add new lines after each section, the string parses but if I don't, the string returns an empty object. I believe the prefixes are different for each state so I'm unsure of how to parse the string programmatically. Is there a way to parse the data without requiring the new line characters?
Thanks for the help.
Hello, This is a nice little utility! We noticed that it uses let
and const
(ES6) and is breaking our webpack build due to the fact that Uglify JS cannot minify ES6 code. Super easy to fork into our own function but just wanted to give a heads up. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.