mirror of
https://github.com/quinton-ashley/java2js
synced 2024-12-29 10:11:54 +01:00
1.2.8
This commit is contained in:
parent
f122d89264
commit
d1dbf3b6f2
@ -10,6 +10,11 @@ jdk.imports['java.util.Collections'].load = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
Collections.shuffle = (list) => {
|
||||
if (!list.size()) return;
|
||||
list.sort(() => Math.random() - 0.5);
|
||||
};
|
||||
|
||||
Collections.swap = (list, i, j) => {
|
||||
const l = list;
|
||||
l.set(i, l.set(j, l.get(i)));
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "java2js",
|
||||
"version": "1.2.7",
|
||||
"version": "1.2.8",
|
||||
"description": "Converts Java to JavaScript and runs it with a JS JDK",
|
||||
"main": "jdk.js",
|
||||
"scripts": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user