src/generators/uuid.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 13
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
mnd 0
bc 0
fnc 1
dl 0
loc 13
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A UUIDGenerator.generate 0 3 1
1
import crypto from 'crypto';
2
import Generator from './Base';
3
4
/**
5
 * Generates a random uuid.
6
 * @returns {string} uuid
7
 * @generator
8
 */
9
export default class UUIDGenerator extends Generator {
10
    generate() {
11
        return crypto.randomUUID();
12
    }
13
}
14