Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@apiverve/textlanguage

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apiverve/textlanguage - npm Package Compare versions

Comparing version
1.1.13
to
1.1.14
+3
-9
index.js

@@ -16,14 +16,8 @@ const axios = require('axios');

// Validate API key format (GUID or alphanumeric with hyphens)
const apiKeyPattern = /^[a-zA-Z0-9-]+$/;
// Validate API key format (GUID, prefixed keys like apv_xxx, or alphanumeric)
const apiKeyPattern = /^[a-zA-Z0-9_-]+$/;
if (!apiKeyPattern.test(api_key)) {
throw new Error('Invalid API key format. API key must be alphanumeric and may contain hyphens. Get your API key at: https://apiverve.com');
throw new Error('Invalid API key format. API key must be alphanumeric and may contain hyphens and underscores. Get your API key at: https://apiverve.com');
}
// Check minimum length (GUIDs are typically 36 chars with hyphens, or 32 without)
const trimmedKey = api_key.replace(/-/g, '');
if (trimmedKey.length < 32) {
throw new Error('Invalid API key. API key appears to be too short. Get your API key at: https://apiverve.com');
}
if (typeof secure !== 'boolean') {

@@ -30,0 +24,0 @@ throw new Error('Secure parameter must be a boolean value.');

{
"name": "@apiverve/textlanguage",
"version": "1.1.13",
"version": "1.1.14",
"description": "Text Language is a simple tool for detecting the language of a text. It returns the language code.",

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