uuid-apikey
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -19,2 +19,3 @@ { | ||
"no-control-regex": "warn", | ||
"no-prototype-builtins": "warn", | ||
"block-scoped-var": "warn", | ||
@@ -21,0 +22,0 @@ "complexity": ["warn", 15], |
@@ -0,0 +0,0 @@ { |
{ | ||
"name": "uuid-apikey", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "A Base32-Crockford encoded API Key generator, validator, and converter to turn UUIDs into human readable API Keys", | ||
@@ -35,17 +35,17 @@ "main": "index.js", | ||
"codacy-coverage": "^3.4.0", | ||
"eslint": "^5.16.0", | ||
"gulp": "^4.0.0", | ||
"gulp-eslint": "^5.0.0", | ||
"gulp-mocha": "^6.0.0", | ||
"eslint": "^6.2.2", | ||
"gulp": "^4.0.2", | ||
"gulp-eslint": "^6.0.0", | ||
"gulp-mocha": "^7.0.1", | ||
"gulp-prettier": "^2.1.0", | ||
"mocha": "^6.1.3", | ||
"nyc": "^14.0.0", | ||
"prettier": "^1.17.0" | ||
"mocha": "^6.2.0", | ||
"nyc": "^14.1.1", | ||
"prettier": "^1.18.2" | ||
}, | ||
"dependencies": { | ||
"colors": "^1.3.3", | ||
"commander": "^2.20.0", | ||
"commander": "^3.0.0", | ||
"encode32": "^1.1.0", | ||
"uuid": "^3.3.2" | ||
"uuid": "^3.3.3" | ||
} | ||
} |
@@ -0,0 +0,0 @@ # uuid-apikey |
@@ -6,3 +6,4 @@ const chai = require('chai'); | ||
uuid: '872a6f67-7d93-4e9c-8d9a-4637a3feff65', | ||
apiKey: 'GWN6YSX-FP9MX73-HPD4CDY-MFZFYSC' | ||
apiKey: 'GWN6YSX-FP9MX73-HPD4CDY-MFZFYSC', | ||
apiKeyNoDashes: 'GWN6YSXFP9MX73HPD4CDYMFZFYSC' | ||
}; | ||
@@ -28,2 +29,6 @@ const testUUID = '0b9ca335-92a8-46d8-b277-ec2ed83ac427'; | ||
it('test empty UUID', () => { | ||
expect(() => { MainClass.isUUID(null); }).to.throw(ReferenceError); | ||
}); | ||
it('test good API Key', () => { | ||
@@ -40,2 +45,5 @@ expect(MainClass.isAPIKey(testKey.apiKey)).to.be.equal(true); | ||
}); | ||
it('test empty API Key', () => { | ||
expect(() => { MainClass.isAPIKey(null); }).to.throw(ReferenceError); | ||
}); | ||
@@ -46,6 +54,38 @@ it('convert to UUID', () => { | ||
it('convert to API Key', () => { | ||
expect(MainClass.isAPIKey(MainClass.toAPIKey(testKey.uuid))).to.be.equal(true); | ||
it('convert bad UUID', () => { | ||
expect(() => { MainClass.isUUID(MainClass.toUUID('----')); }).to.throw(TypeError); | ||
}); | ||
it('convert empty UUID', () => { | ||
expect(() => { MainClass.isUUID(MainClass.toUUID(null)); }).to.throw(ReferenceError); | ||
}); | ||
it('convert to APIKey', () => { | ||
expect(MainClass.isAPIKey(MainClass.toAPIKey(testKey.uuid, { noDashes: true }))).to.be.equal(true); | ||
}); | ||
it('convert bad APIKey', () => { | ||
expect(() => { MainClass.isUUID(MainClass.toAPIKey('----')); }).to.throw(TypeError); | ||
}); | ||
it('convert empty APIKey', () => { | ||
expect(() => { MainClass.isUUID(MainClass.toAPIKey(null)); }).to.throw(ReferenceError); | ||
}); | ||
it('test empty API Key', () => { | ||
expect(() => { MainClass.check(null, testKey.uuid); }).to.throw(ReferenceError); | ||
}); | ||
it('test empty UUID Key', () => { | ||
expect(() => { MainClass.check(testKey.apiKey, null); }).to.throw(ReferenceError); | ||
}); | ||
it('test bad API Key', () => { | ||
expect(() => { MainClass.check('-----', testKey.uuid); }).to.throw(TypeError); | ||
}); | ||
it('test bad UUID Key', () => { | ||
expect(() => { MainClass.check(testKey.apiKey, '----'); }).to.throw(TypeError); | ||
}); | ||
it('test good matching API Key / UUID', () => { | ||
@@ -52,0 +92,0 @@ expect(MainClass.check(testKey.apiKey, testKey.uuid)).to.be.equal(true); |
Sorry, the diff of this file is not supported yet
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
27467
477
+ Addedcommander@3.0.2(transitive)
- Removedcommander@2.20.3(transitive)
Updatedcommander@^3.0.0
Updateduuid@^3.3.3