Comparing version 0.0.15 to 0.0.16
@@ -106,4 +106,6 @@ | ||
// get version of aamva (before 2000 or after) | ||
var version = data.match(/ANSI \d{6}(\d{2})/); | ||
var version = data.match(/[A-Z ]{5}\d{6}(\d{2})/); | ||
var parseRegex; | ||
@@ -114,2 +116,3 @@ | ||
parseRegex = new RegExp( | ||
'(DAQ.*?)?' + // Drivers license number | ||
'(DAA.*?)?' + // Driver License Name | ||
@@ -327,3 +330,3 @@ '(DAG.*?)?' + // Driver Mailing Street Address | ||
if ( res[i] !== undefined ) { | ||
parsedData[ String(res[i]).substring(0,3) ] = res[i].substring(3); | ||
parsedData[ String(res[i]).substring(0,3) ] = res[i].substring(3).trim(); | ||
} | ||
@@ -416,3 +419,3 @@ } | ||
"id": function(){ | ||
return parsedData.DAQ; | ||
return parsedData.DAQ.replace(/[^A-ZA-Z0-9]/g, ""); | ||
} | ||
@@ -419,0 +422,0 @@ }; |
{ | ||
"name": "aamva", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "Parse AAMVA magnetic stripe", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,1 +1,3 @@ | ||
[![Build Status](https://drone.io/github.com/winfinit/aamvajs/status.png)](https://drone.io/github.com/winfinit/aamvajs/latest) | ||
# aamva.js | ||
@@ -101,2 +103,3 @@ | ||
* 0.0.13 added pdf417 support, added example page, and changed plugin to be compatible with browser | ||
* 0.0.16 fixed version regex for pdf417, and added MD tests. | ||
@@ -103,0 +106,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34319
11
630
121