Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hydra

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hydra - npm Package Compare versions

Comparing version 1.2.13-experimental to 1.2.14-experimental

21

lib/utils.js

@@ -74,4 +74,25 @@ 'use strict';

/**
* @name shortID
* @summary generate a random id composed of alphanumeric characters
* @see https://en.wikipedia.org/wiki/Base36
* @return {string} random string id
*/
static shortID() {
return (Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)).toString(36);
}
/**
* @name isUUID4
* @summary determine whether a string is a valid UUID
* @param {string} str - possible UUID
* @return {undefined}
*/
static isUUID4(str) {
const uuidPattern = '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$';
return (new RegExp(uuidPattern)).test(str);
}
}
module.exports = Utils;

2

package.json
{
"name": "hydra",
"version": "1.2.13-experimental",
"version": "1.2.14-experimental",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": "Carlos Justiniano",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc