Socket
Socket
Sign inDemoInstall

uuid-apikey

Package Overview
Dependencies
76
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

2

index.js

@@ -36,3 +36,3 @@ // index.js

isAPIKey(apiKey) {
apiKey = apiKey.replace(/-/g, '');
apiKey = apiKey.toUpperCase().replace(/-/g, '');
let re = /[0-9A-Z]*/g;

@@ -39,0 +39,0 @@ return (apiKey.length === 28 && re.test(apiKey));

{
"name": "uuid-apikey",
"version": "1.1.0",
"version": "1.1.1",
"description": "A Base32-Crockford encoded API Key generator, validator, and converter to turn UUIDs into human readable API Keys",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,2 +28,6 @@ const test = require('unit.js');

it('test good lower-case API Key', () => {
test.assert(MainClass.isAPIKey(testKey.apiKey.toLowerCase()));
})
it('test bad API Key', () => {

@@ -30,0 +34,0 @@ test.assert(!MainClass.isAPIKey(testKey.uuid));

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc