Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including codewars with all npm packages installed. Try it out:

var codewars = require("codewars")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

codewars v0.2.0

CLI for

codewars library and cli for retrieving, testing locally and attempting katas.


$ mkdir kata; cd kata

$ codewars next  // or kata_id instead

$ ls kata.js test.js

$ codewars test  // local testing
Test Passed

$ codewars attempt


next - retrieves the next kata. Places the stub into kata.js, the test into test.js and the description in the

<kata_id_or_slug> - same as next, but by providing a specific kata id or slug

test - run the test.js with kata.js

test --watch or -w - will run the test, and watch for changes in the files; re-running the test when a file is updated

Regarding stack-traces

Stack-traces, or at least the line number and the character of the failed code, are visible only in Node v0.11 and above. This is due to the new displayErrors option of the vm module, which is not available on older versions.

A pull-request is welcome for a way to run katas securely and have stack-traces on earlier versions of Node.




RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free