Skip to content

Conversation

@vas3a
Copy link
Collaborator

@vas3a vas3a commented Oct 27, 2025

No description provided.

@vas3a vas3a requested a review from kkartunov October 27, 2025 05:36
import { Logger } from 'src/shared/global';

function formatDate(date = new Date()) {
const pad = (n, z = 2) => String(n).padStart(z, '0');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 performance]
The pad function is defined inside formatDate and will be recreated every time formatDate is called. Consider moving pad outside of formatDate to avoid unnecessary redefinitions.

@vas3a vas3a merged commit baec98e into dev Oct 27, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants