ideone-node

0.0.3 • Public • Published

ideone for node.js

NPM version build status node version npm download npm license

How to use

npm install --save ideone-node

Usage

const Ideone = require('ideone-node');
const ins = new Ideone('token','custom id');
const source = 'print("hello world");',input='';
ins.setMode(112);// 112 means javascript, other language support id can be seen in the ideone site.
ins.run(source,input).then(data => console.log(data.output))
ins.support().then(support => console.log(support)) // Get suppor language array

method

  • setMode(id) set the language where you need
  • run(source,input) set the source code which you run and the input data,return a Promise
  • support get the support languages, return a Promise

node

node > 8 because the package use async/await syntax

Update

v0.0.3 add Tese,License and fix a bug

run test

Set your token and customId in the root's config.js.For example:

//config.js
const config = {
    custimId:'xxx',
    accessToken:'xxxxxx'   
}
 
module.exports = config;

then,

npm run test

LICENSE

MIT

Readme

Keywords

Package Sidebar

Install

npm i ideone-node

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

6.89 kB

Total Files

6

Last publish

Collaborators

  • flytam