MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / shuffleArray

Function shuffleArray

public/iframe/lib/js/echarts-wordcloud.js:308–314  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

306
307 // Based on http://jsfromhell.com/array/shuffle
308 var shuffleArray = function shuffleArray(arr) {
309 for (var j, x, i = arr.length; i;
310 j = Math.floor(Math.random() * i),
311 x = arr[--i], arr[i] = arr[j],
312 arr[j] = x) {}
313 return arr;
314 };
315
316 var WordCloud = function WordCloud(elements, options) {
317 if (!isSupported) {

Callers 1

putWordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected