Commit e2fdb08 1 parent 59b67f0 commit e2fdb08 Copy full SHA for e2fdb08
File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -19,20 +19,22 @@ export class Security {
19
19
}
20
20
21
21
/**
22
- * Generates a random CVE between the given boundaries
22
+ * Generates a random CVE between the given boundaries.
23
23
*
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`.
27
27
*
28
28
* @example
29
29
* faker.security.cve() // 'CVE-2011-0762'
30
30
* faker.security.cve({from:'2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z') // 'CVE-2028-0762'
31
31
*/
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 {
36
38
const fromMs = toDate ( options ?. from || '1999-01-01T00:00:00.000Z' ) ;
37
39
const toMs = toDate ( options ?. to ) ;
38
40
You can’t perform that action at this time.
0 commit comments