jotafeldmann / code-comment-remover

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code Comment Remover Node.js CI

Scope of the task

Implement a feature that removes the comments from a TypeScript code using the following interfaces.

interface ICodeCommentRemover { 
 trimComment(c: string): void; 
}

interface ICodeWriter { 
 write(c: string): void; 
}

The method trimComment receives the TypeScript code char by char. The interface ICodeWriter may have several implementations for different outputs (text file, console). This implementation is not in the scope of your task.

Scenario

Input:

// some comments 
var result = a / b; 

Output:

var result = a / b;

How to

npm install
  • Simple run
npm start
  • Run tests
npm test
  • Run tests and watch for modifications
npm run test/watch

Technical details

About


Languages

Language:TypeScript 100.0%