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

@augment-vir/common

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@augment-vir/common - npm Package Compare versions

Comparing version 29.2.0 to 29.3.0

5

dist/cjs/augments/random.js

@@ -5,3 +5,2 @@ "use strict";

exports.randomBoolean = randomBoolean;
exports.createUuid = createUuid;
exports.randomString = randomString;

@@ -67,6 +66,2 @@ const common_number_1 = require("./common-number");

}
/** Creates a cryptographically secure uuid. */
function createUuid() {
return crypto.randomUUID();
}
const validStringCharacters = [

@@ -73,0 +68,0 @@ 'a',

6

dist/cjs/augments/string/uuid.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUuid = isUuid;
exports.createUuid = createUuid;
const uuidRegExp = /[\d\w]{8}-[\d\w]{4}-[\d\w]{4}-[\d\w]{4}-[\d\w]{12}/;
/** Checks if the input string is a valid v4 UUID. */
function isUuid(maybeUuid) {
return !!maybeUuid.match(uuidRegExp);
}
/** Creates a cryptographically secure v4 UUID using `crypto.randomUUID`. */
function createUuid() {
return crypto.randomUUID();
}

4

dist/esm/augments/random.js

@@ -60,6 +60,2 @@ import { clamp, ensureMinAndMax } from './common-number';

}
/** Creates a cryptographically secure uuid. */
export function createUuid() {
return crypto.randomUUID();
}
const validStringCharacters = [

@@ -66,0 +62,0 @@ 'a',

const uuidRegExp = /[\d\w]{8}-[\d\w]{4}-[\d\w]{4}-[\d\w]{4}-[\d\w]{12}/;
/** Checks if the input string is a valid v4 UUID. */
export function isUuid(maybeUuid) {
return !!maybeUuid.match(uuidRegExp);
}
/** Creates a cryptographically secure v4 UUID using `crypto.randomUUID`. */
export function createUuid() {
return crypto.randomUUID();
}

@@ -32,4 +32,2 @@ /**

export declare function randomBoolean(percentLikelyToBeTrue?: number): boolean;
/** Creates a cryptographically secure uuid. */
export declare function createUuid(): `${string}-${string}-${string}-${string}-${string}`;
/**

@@ -36,0 +34,0 @@ * Creates a random string (including letters and numbers) of a given length.

@@ -0,1 +1,5 @@

export type UuidV4 = ReturnType<typeof createUuid>;
/** Checks if the input string is a valid v4 UUID. */
export declare function isUuid(maybeUuid: string): boolean;
/** Creates a cryptographically secure v4 UUID using `crypto.randomUUID`. */
export declare function createUuid(): `${string}-${string}-${string}-${string}-${string}`;
{
"name": "@augment-vir/common",
"version": "29.2.0",
"version": "29.3.0",
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common",

@@ -5,0 +5,0 @@ "bugs": {

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