Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 685 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 685 Bytes

JDoodle API

Unofficial API Wrapper for JDoodle REPL Website.

Check valid languageCode and versionIndex at JDoodle Docs

Installation

npm i jdoodle-api

Usage

const jdoodle = require("jdoodle-api");
// or
import jdoodle from "jdoodle-api";

// https://docs.jdoodle.com/compiler-api/compiler-api#what-languages-and-versions-supported
const language = {
	languageCode: "nodejs",
	versionIndex: 2
};

const script = "console.log('Hello World!')";

jdoodle(language, script).then((result) => {
	console.log(result.output); // Hello World!
});