New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

java2js

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

java2js - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

1

jdk/java/lang/System.js

@@ -10,2 +10,3 @@ jdk.imports['java.lang.System'].load = async () => {

System.out = new PrintStream();
System.err = System.out;
System.out.onPrint = (length) => {

@@ -12,0 +13,0 @@ System.in.mark += length;

2

package.json
{
"name": "java2js",
"version": "1.2.0",
"version": "1.2.1",
"description": "Converts Java to JavaScript and runs it with a JS JDK",

@@ -5,0 +5,0 @@ "main": "jdk.js",

@@ -43,2 +43,3 @@ # Java to JavaScript (java2js)

- imports
- primitive type casting
- static classes

@@ -58,3 +59,3 @@ - static methods

- root (optional) path to the JS JDK folder, by default it is `./jdk` (the java2js JS JDK), for online use on codepen or similar code sharing sites you can use this link as the root path: 'https://unpkg.com/java2js/jdk'
- root: (optional) path to the JS JDK folder, by default it is `./jdk` (the java2js JS JDK), for online use on codepen or similar code sharing sites you can use this link as the root path: 'https://unpkg.com/java2js/jdk'

@@ -65,3 +66,3 @@ ### await jdk.transpile(javaFile)

- javaFile is a String with a Java class in it
- javaFile: a String with a Java class in it

@@ -72,4 +73,6 @@ returns a String with the JavaScript transpilation of the Java class

Runs the main method with optional JVM arguments.
Runs the main method
- jvmArgs: (optional) String array of JVM arguments.
## Known limitations

@@ -79,4 +82,2 @@

- casting to int (truncation) requires parenthesis around the number being cast `int x = (int) (Math.random() * 100);`
- no support for method overloading, though a workaround might be possible by making a function with the og name route to each of the variations of the overloaded function

@@ -83,0 +84,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc