Intent - Encapsulate a request as an object thereby letting you parameterize with different requests , queue or log requests and support undoable options
Now we will create two classes exit command will exit out of nodejs and create command will create new file.
Now the interesting part of this post comes where we will define a class with help of which we will be able to run above defined commands , undo previously run command or redo previously undo command.
At last with help of readline module we will take input from user of command which is to be executed..
Hope you like the post.Keep learning...
Comments
Post a Comment