Skip to content

jotafeldmann/code-comment-remover

Repository files navigation

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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors