alapa
Version:
A cutting-edge web development framework designed to revolutionize the way developers build modern web applications.
16 lines (15 loc) • 410 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.shuffle = void 0;
const shuffle = function (data) {
const a = data.split("");
const n = a.length;
for (let i = n - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
const tmp = a[i];
a[i] = a[j];
a[j] = tmp;
}
return a.join("");
};
exports.shuffle = shuffle;
;