Comparing version 0.0.4 to 1.0.0
{ | ||
"name": "dlgen", | ||
"version": "0.0.4", | ||
"version": "1.0.0", | ||
"description": "State ID/Driver license generator", | ||
"main": "index.js", | ||
"main": "built/dlgen.js", | ||
"scripts": { | ||
"test": "make test" | ||
}, | ||
"test": "mocha" | ||
}, | ||
"repository": { | ||
@@ -14,13 +14,10 @@ "type": "git", | ||
"keywords": [ | ||
"aamva", | ||
"driver", | ||
"license", | ||
"AAMVA", | ||
"AMVA", | ||
"id generator", | ||
"state id generator", | ||
"state id" | ||
"age", | ||
"age calculator", | ||
"age-calculator", | ||
"calculate age", | ||
"find age" | ||
], | ||
"author": "Roman Jurkov <winfinit@gmail.com>", | ||
"license": "GNU General Public License", | ||
"license": "GPL-3.0", | ||
"bugs": { | ||
@@ -30,12 +27,10 @@ "url": "https://github.com/winfinit/dlgen-js/issues" | ||
"dependencies": { | ||
"soundex": "*" | ||
"soundex": "^0.2.1" | ||
}, | ||
"homepage": "https://github.com/winfinit/dlgen-js", | ||
"devDependencies": { | ||
"mocha": "^1.21.4", | ||
"chai": "^1.9.1" | ||
}, | ||
"directories": { | ||
"test": "test" | ||
"@types/node": "^6.0.58", | ||
"mocha": "^3.2.0", | ||
"chai": "^3.5.0" | ||
} | ||
} |
@@ -14,26 +14,17 @@ # dlgen.js | ||
```javascript | ||
dlgen.prototype.bake(<object | person>, <bool | format>); | ||
// Generate ID for John Doe | ||
var dlgen = require('dlgen'); | ||
let {DLGenerator, DLPerson} = require('dlgen'); | ||
var formatted_id = dlgen.bake({ | ||
"state": "FL", | ||
"firstName": "JOHN", | ||
"lastName": "DOE", | ||
"middleName": "", | ||
"dob": new Date(1984,10,26), | ||
"gender": "male" //or female | ||
}, true); | ||
console.log(formatted_id); /* J500-160-84-426-0 */ | ||
var raw_id = dlgen.bake({ | ||
"state": "FL", | ||
"firstName": "JOHN", | ||
"lastName": "DOE", | ||
"middleName": "", | ||
"dob": new Date(1984,10,26), | ||
"gender": "male" //or female | ||
let person = new DLPerson({ | ||
firstName: "DOE", | ||
lastName: "JOHN", | ||
middleName: "", | ||
dob: new Date(1984,10,26), | ||
gender: "Male" | ||
}); | ||
console.log(raw_id); /* J500160844260 */ | ||
let dlGenerator = new DLGenerator(person); | ||
dlGenerator.toFormattedString(); // J500-160-84-426-0 | ||
dlGenerator.toString(); // J500160844260 | ||
``` | ||
@@ -40,0 +31,0 @@ |
@@ -1,29 +0,25 @@ | ||
var should = require('chai').should(), | ||
expect = require('chai').expect, | ||
dlgen = require('../index'); | ||
var expect = require('chai').expect; | ||
let {DLGenerator, DLPerson} = require('../built/dlgen'); | ||
describe('id', function() { | ||
describe('DLGenerator ID', function() { | ||
it('should be formatted', function(){ | ||
var id = dlgen.bake({ | ||
lastName: "JOHN", | ||
firstName: "DOE", | ||
middleName: "", | ||
gender: "male", | ||
dob: new Date(1984,10,26) | ||
}, true); | ||
expect(id).to.equal("J500-160-84-426-0"); | ||
let dlGenerator = new DLGenerator(new DLPerson({ | ||
firstName: "DOE", | ||
lastName: "JOHN", | ||
middleName: "", | ||
dob: new Date(1984,10,26), | ||
gender: "Male" | ||
})); | ||
expect(dlGenerator.toFormattedString()).to.equal("J500-160-84-426-0"); | ||
}); | ||
it('should be not formatted', function(){ | ||
var id = dlgen.bake({ | ||
lastName: "JOHN", | ||
firstName: "DOE", | ||
middleName: "", | ||
gender: "male", | ||
dob: new Date(1984,10,26) | ||
}); | ||
expect(id).to.equal("J500160844260"); | ||
let dlGenerator = new DLGenerator(new DLPerson({ | ||
firstName: "DOE", | ||
lastName: "JOHN", | ||
middleName: "", | ||
dob: new Date(1984,10,26), | ||
gender: "Male" | ||
})); | ||
expect(dlGenerator.toString()).to.equal("J500160844260") | ||
}); | ||
}); | ||
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
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
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
54346
12
0
1075
0
1
3
60
1
Updatedsoundex@^0.2.1