0.0.5 • Published 11 months ago

convertor-core v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

how to use?

  • Download the converter:
npm i converter-core

Usage

  • A visual example of the converter
const conv = require("converter-core");
conv.on("logging", (l) => {
  console.log(l.log);
});

const pythonCode = `
print("Hello, Python!")
`;

const pythonOutput = conv.py(pythonCode);
console.log("Python Output:", pythonOutput);

const jsCode = `
console.log("Hello, JavaScript!");
`;

const jsOutput = conv.js(jsCode);
console.log("JS Output:", jsOutput);

const rubyCode = `
puts "Hello, Ruby!"
`;

const rubyOutput = conv.rb(rubyCode);
console.log("Ruby Output:", rubyOutput);

const javaCode = `
public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, Java!");
  }
}
`;

const javaOutput = conv.java(javaCode, "HelloWorld");
console.log("Java Output:", javaOutput);

const rastCode = `
out "Hello, Rast!"
`;

const rastOutput = conv.rast(rastCode, "hello");
console.log("Rast Output:", rastOutput);

conv.run("python.py"); // Run the Python file in "History" folder
conv.run("node.js"); // Run the JavaScript file in "History" folder
conv.run("ruby.rb"); // Run the Ruby file in "History" folder
conv.run("HelloWorld.java"); // Run the Java file in "History" folder
conv.run("hello.rast"); // Run the Rast file in "History" folder
  • As a result, it will be spread over two files, if you change the code in the methods, then it will change in the files too.

In version 0.0.4 beta added:

  • bug fixed!
0.0.5

11 months ago

0.0.4-beta

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.2-beta

11 months ago

0.0.1

11 months ago