v1.0.3
An ES (JavaScript & TypeScript) module to shuffle the array's indexes.
Attributes
Includes Deno configuration
Repository
Current version released
a year ago
Dependencies
other
Shuffle Array (Deno)
Heat | Release - Latest | Release - Pre | |
---|---|---|---|
| | () | () |
A Deno module to shuffle the array’s indexes.
🔗 Other Edition:
📓 Documentation
Getting Started
- Deno >= v1.34.0
import shuffleArray from "<URL>";// Default Import
Domain / Registry | URL |
---|---|
Deno Land | https://deno.land/x/shuffle_array[@<Tag>]/mod.ts |
DenoPKG | https://denopkg.com/hugoalh-studio/shuffle-array-deno[@<Tag>]/mod.ts |
GitHub Raw * | https://raw.githubusercontent.com/hugoalh-studio/shuffle-array-deno/<Tag>/mod.ts |
Pax | https://pax.deno.dev/hugoalh-studio/shuffle-array-deno[@<Tag>]/mod.ts |
*: Must provide a tag.
API
function shuffleArray<T>(item: T[]): T[];
Example
const chain = [3, 7, 25, 26, 42, 62, 71, 76, 92, 93]; shuffleArray(chain); //=> [62, 93, 26, 42, 25, 7, 76, 71, 3, 92] shuffleArray(chain); //=> [42, 3, 26, 62, 93, 7, 76, 25, 92, 71]