Skip to content

Commit ae7b3ca

Browse files
authored
chore(date): adjust to our standard implementation (#1589)
1 parent 6e1009a commit ae7b3ca

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/modules/date/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,8 @@ export class DateModule {
230230
*
231231
* @since 3.0.1
232232
*/
233-
month(options?: { abbr?: boolean; context?: boolean }): string {
234-
const abbr = options?.abbr ?? false;
235-
const context = options?.context ?? false;
233+
month(options: { abbr?: boolean; context?: boolean } = {}): string {
234+
const { abbr = false, context = false } = options;
236235

237236
const source = this.faker.definitions.date.month;
238237
let type: keyof DateEntryDefinition;
@@ -266,9 +265,8 @@ export class DateModule {
266265
*
267266
* @since 3.0.1
268267
*/
269-
weekday(options?: { abbr?: boolean; context?: boolean }): string {
270-
const abbr = options?.abbr ?? false;
271-
const context = options?.context ?? false;
268+
weekday(options: { abbr?: boolean; context?: boolean } = {}): string {
269+
const { abbr = false, context = false } = options;
272270

273271
const source = this.faker.definitions.date.weekday;
274272
let type: keyof DateEntryDefinition;

0 commit comments

Comments
 (0)