generator-hackerrank
Generate a Javascript template & unit tests for solving another one of those /r/hackerrank challenges
Installation
First, install Yeoman and generator-hackerrank using npm (we assume you have pre-installed node.js).
npm install -g yonpm install -g generator-hackerrank
Then generate your new project:
yo hackerrank
This will ask for the task scope and name, along with some other options, and produce the following result:
Main file
// {scope}/{task}.js const solve = { // Put your solution here return n;}; moduleexports = solve ;
Unit tests
// {scope}/{task}.test.js const solve = ; ;
License
MIT © Wain-PC