UNPKG

@rohitbakoliya/test-gen

Version:

Quickly generate test cases for stress testing using interactive CLI.

16 lines (15 loc) 402 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Randomly re-arrange the array elements */ const SuffleArray = (arr) => { for (let i = arr.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * i); const temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } return arr; }; exports.default = SuffleArray;