Skip to content

Commit e2fdb08

Browse files
committed
chore: address PR comments
1 parent 59b67f0 commit e2fdb08

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/modules/security/index.ts

+10-8
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@ export class Security {
1919
}
2020

2121
/**
22-
* Generates a random CVE between the given boundaries
22+
* Generates a random CVE between the given boundaries.
2323
*
24-
* @param options
25-
* @param options.from The early date boundary
26-
* @param options.to The late date boundary
24+
* @param options The options to use. Defaults to `{}`.
25+
* @param options.from The early date boundary. Defaults to `1999-01-01T00:00:00.000Z`.
26+
* @param options.to The late date boundary. Defaults to `now`.
2727
*
2828
* @example
2929
* faker.security.cve() // 'CVE-2011-0762'
3030
* faker.security.cve({from:'2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z') // 'CVE-2028-0762'
3131
*/
32-
cve(options?: {
33-
from: string | Date | number;
34-
to: string | Date | number;
35-
}): string {
32+
cve(
33+
options: {
34+
from?: string | Date | number;
35+
to?: string | Date | number;
36+
} = {}
37+
): string {
3638
const fromMs = toDate(options?.from || '1999-01-01T00:00:00.000Z');
3739
const toMs = toDate(options?.to);
3840

0 commit comments

Comments
 (0)