Skip to content

Commit

Permalink
chore: address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thisislawatts committed Aug 17, 2022
1 parent 59b67f0 commit e2fdb08
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/modules/security/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,22 @@ export class Security {
}

/**
* Generates a random CVE between the given boundaries
* Generates a random CVE between the given boundaries.
*
* @param options
* @param options.from The early date boundary
* @param options.to The late date boundary
* @param options The options to use. Defaults to `{}`.
* @param options.from The early date boundary. Defaults to `1999-01-01T00:00:00.000Z`.
* @param options.to The late date boundary. Defaults to `now`.
*
* @example
* faker.security.cve() // 'CVE-2011-0762'
* faker.security.cve({from:'2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z') // 'CVE-2028-0762'
*/
cve(options?: {
from: string | Date | number;
to: string | Date | number;
}): string {
cve(
options: {
from?: string | Date | number;
to?: string | Date | number;
} = {}
): string {
const fromMs = toDate(options?.from || '1999-01-01T00:00:00.000Z');
const toMs = toDate(options?.to);

Expand Down

0 comments on commit e2fdb08

Please sign in to comment.