Polyman Documentation - v2.2.2
    Preparing search index...
    • Determines problem ID from path or direct ID. If path is provided, reads problem ID from Config.json. If numeric string, returns as problem ID.

      Parameters

      • problemIdOrPath: string

        Problem ID or path to directory

      Returns number

      Problem ID

      If Config.json doesn't exist or doesn't contain problem ID

      const id = getProblemId('123456');  // Returns: 123456
      const id = getProblemId('./my-problem'); // Reads from Config.json
      const id = getProblemId('.'); // Reads from current directory's Config.json