Skip to content

easterEggUtil > generateHappy()Β #74

@klmhyeonwoo

Description

@klmhyeonwoo
export function generateHappy(message?: string) {
  const defaultMessages = [
    "Keep going β€” you're doing great! πŸ’ͺ",
    "Small steps lead to big changes. 🌱",
    "Today is a good day to smile. 😊",
    "You're closer than you think. 🌈",
    "Stay curious, stay kind. ✨",
    "Progress, not perfection. πŸš€",
    "You make the code better. πŸ’»β€οΈ",
    "Breathe. You’re doing your best. 🌀️",
    "Trust the process, enjoy the journey. πŸ›€οΈ",
    "Every bug fixed is a victory. πŸžπŸ†",
  ];

  const text =
    message ??
    defaultMessages[Math.floor(Math.random() * defaultMessages.length)];
  const timestamp = new Date().toLocaleTimeString();

  console.log(
    `%c[${timestamp}] %c${text}`,
    'color: #ff69b4; font-weight: bold;',
    'color: #333; font-size: 14px;'
  );

  return text;
}

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions