Skip to main content

uuid

PropertyValue
Packageuuid
Versions Covered>=9.0.0 <14.0.0
Contract Version1.0.0
Statusproduction
Last Verified2026-02-26
Maintainercorpus-team

Installation

npm install uuid

Covered Functions

This contract covers 1 function(s):

v4()

Generates a random UUID v4

Import:

import { v4 } from 'uuid';

Postconditions

What happens after calling this function:

⚠️ WARNING - v4-returns-valid-uuid

Condition: called with valid or no arguments

Returns:

string containing valid UUID v4 format

Required Handling:

When accepting UUID from user input, caller SHOULD use validate() to verify format before using in database queries or business logic. Malformed UUIDs can cause SQL errors or security issues.

📖 Source


Example: Proper Error Handling

See Also