Home / Function/ shuffle() — fastapi Function Reference

shuffle() — fastapi Function Reference

Architecture documentation for the shuffle() function in custom.js from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  96bb8bea_1e0c_d064_4302_23cb3798fdd0["shuffle()"]
  415abf33_9daf_dfdc_6109_c2f3344872a5["showRandomAnnouncement()"]
  415abf33_9daf_dfdc_6109_c2f3344872a5 -->|calls| 96bb8bea_1e0c_d064_4302_23cb3798fdd0
  style 96bb8bea_1e0c_d064_4302_23cb3798fdd0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs/en/docs/js/custom.js lines 115–125

function shuffle(array) {
    var currentIndex = array.length, temporaryValue, randomIndex;
    while (0 !== currentIndex) {
        randomIndex = Math.floor(Math.random() * currentIndex);
        currentIndex -= 1;
        temporaryValue = array[currentIndex];
        array[currentIndex] = array[randomIndex];
        array[randomIndex] = temporaryValue;
    }
    return array;
}

Subdomains

Frequently Asked Questions

What does shuffle() do?
shuffle() is a function in the fastapi codebase.
What calls shuffle()?
shuffle() is called by 1 function(s): showRandomAnnouncement.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free