Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add MS sample data + new DAA field #27

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

chancesmith
Copy link
Contributor

changes made

  • add MS sample data
  • add DAA field

Comment on lines +3 to +4
const UsdlDataTN = require('./sample/index').UsdlDataTN
const UsdlDataMS = require('./sample/index').UsdlDataMS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename data by state

Comment on lines +20 to +23
expect(parsedData.documentNumber).toEqual('802926467')
expect(parsedData.firstName).toEqual('JANICE')
expect(parsedData.lastName).toEqual('SMITH')
expect(parsedData.middleName).toEqual('C')
Copy link
Contributor Author

@chancesmith chancesmith Dec 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parse full name into separate fields

@@ -5,6 +5,7 @@ exports.CodeToKey = {
DCB: 'jurisdictionRestrictionCodes',
DCD: 'jurisdictionEndorsementCodes',
DBA: 'dateOfExpiry',
DAA: 'fullName',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new DAA key

let started
lines.slice(0, -1).forEach((line) => {
if (!started) {
if (line.indexOf('ANSI ') === 0) {
if (line.indexOf('ANSI') === 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove space from ANSI to check for MS when space doesn't exist

Comment on lines +42 to +47
if (code === 'DAA') {
const nameArray = value.split(',')
props.firstName = nameArray[1]
props.lastName = nameArray[0]
props.middleName = nameArray[2]
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

past full name to separate fields

@mvayngrib
Copy link
Owner

@chancesmith if you're interested in continuing to work with this repo, can i add you to collaborators? Then you can do your thing. Just please stick to semantic versioning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants