Commit fb3bf60c authored by Zach Krall's avatar Zach Krall

added suffle function

parent 9c5c10a2
Pipeline #86936619 passed with stages
in 1 minute and 47 seconds
......@@ -29,11 +29,24 @@
</template>
<script>
function shuffle( array ){
let result = [];
while( result.length < array.length ){
let int = parseInt(array.length * Math.random());
let random = array[int];
if( !result.includes(array[int]) ){
result.push(array[int]);
}
}
return result;
}
export default {
name: 'MemberList',
computed: {
allMembers () {
return this.$site.pages.filter(page => page.path.includes('/member/'));
let array = this.$site.pages.filter(page => page.path.includes('/member/'));
return shuffle(array);
},
allActs () {
return this.$site.pages.filter(page => page.path.includes('/act/'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment