hhkimmm9 / soop-sok

A chat/discussion platform with interesting features for introverts like myself.
https://chat-platform-for-introverts.vercel.app
0 stars 0 forks source link

Name the immediately invoked async function expression (async () => { ... }) #64

Closed hhkimmm9 closed 4 months ago

hhkimmm9 commented 4 months ago

User Story

As a developer, I want to have a named immediately invoked async function expression, so that I can improve debugging, stack traces, and code readability.

Acceptance Criteria

  1. Naming Convention

    • The named immediately invoked async function expression should follow a consistent naming convention that aligns with the existing codebase guidelines.
    • The name should clearly reflect the function's purpose and context.
  2. Functionality

    • The named function should execute immediately and maintain the same behaviour as an unnamed IIFE.
    • There should be no performance degradation or additional side effects introduced by naming the function.
  3. Debugging and Traceability

    • The name should appear in debugging tools and stack traces, aiding in easier identification and troubleshooting of issues.
  4. Code Integration

    • The change should integrate seamlessly with the existing codebase without requiring extensive refactoring.
    • All relevant modules and components that use immediately invoked async functions should be updated accordingly.

Tasks

  1. Research and Planning

    • [x] Investigate best practices for naming async functions in the context of immediately invoked function expressions.
    • [x] Review the existing codebase to understand the current naming conventions and patterns.
  2. Code Implementation

    • [x] Identify all instances of immediately invoked async function expressions in the codebase.
    • [x] Refactor each instance to include a meaningful name, ensuring it adheres to the established naming conventions.