{"id":28456587,"url":"https://github.com/maple3142/simple-judger","last_synced_at":"2026-04-27T18:34:51.525Z","repository":{"id":57360339,"uuid":"96113062","full_name":"maple3142/Simple-Judger","owner":"maple3142","description":null,"archived":false,"fork":false,"pushed_at":"2018-03-14T12:02:47.000Z","size":142,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-25T03:46:15.726Z","etag":null,"topics":["judge","node-module","nodejs","onlinejudge","sandbox"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maple3142.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-03T13:20:39.000Z","updated_at":"2017-09-05T12:48:19.000Z","dependencies_parsed_at":"2022-09-06T22:22:36.372Z","dependency_job_id":null,"html_url":"https://github.com/maple3142/Simple-Judger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maple3142/Simple-Judger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maple3142%2FSimple-Judger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maple3142%2FSimple-Judger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maple3142%2FSimple-Judger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maple3142%2FSimple-Judger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maple3142","download_url":"https://codeload.github.com/maple3142/Simple-Judger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maple3142%2FSimple-Judger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262577681,"owners_count":23331466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["judge","node-module","nodejs","onlinejudge","sandbox"],"created_at":"2025-06-06T23:08:14.177Z","updated_at":"2026-04-27T18:34:51.496Z","avatar_url":"https://github.com/maple3142.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Simple Judger\r\n================\r\nA simple npm module to judge C/C++ program.(Linux only)\r\nusing [EasySandbox](https://github.com/daveho/EasySandbox) for safety judge\r\n\r\n**[jsdoc link](https://maple3142.github.io/docs/simple-judger/)**\r\n\r\nInstall:\r\n----------------\r\nsudo? `npm install simple-judger`\r\n\r\nUsage:\r\n----------------\r\n```javascript\r\nvar judge=require('simple-judger');\r\nvar options={\r\n    src: `#include\u003ciostream\u003e\r\nusing namespace std;\r\n......`, //code !REQUIRED!\r\n    in: '', //input string\r\n    out: '', //output string\r\n    timelimit: 1000, //ms !REQUIRED!\r\n    compile: 'g++ -o {out} {dest}', //compile command, {source} {out} will be replaced !REQUIRED!\r\n    result: { //result strings, these are default value\r\n        Accepted: 'AC',\r\n        Runtime_Error: 'RE',\r\n        Time_Limit_Exceeded: 'TLE',\r\n        Compile_Error: 'CE',\r\n        Wrong_Answer: 'WA',\r\n        System_Error: 'SE'\r\n    }\r\n};\r\njudge(options).then(result=\u003e{\r\n    console.log(result);\r\n});\r\n```\r\nResult Object:\r\n----------------\r\n```javascript\r\n{\r\n    result: 'AC',\r\n    time: 10,\r\n    extra: 'Hello World' \r\n    //extra in different result represent different result\r\n}\r\n```\r\n\r\nrun `npm test` for testing\r\n\r\nInstallation Error:\r\n----------------\r\nif \"permission denied\" appear, add `sudo` then install again\r\n\r\nothers error please create a `Issue` on github\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaple3142%2Fsimple-judger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaple3142%2Fsimple-judger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaple3142%2Fsimple-judger/lists"}