Hello Ravi
If you are seeking Protractor test recorder similar to Selenium IDE, there are several projects in github already, some quite mature e.g.
https://github.com/ealves/protractor-recorderThere is some effort to add a Javascript export to Selenium IDE (I have developed one for Powershell some time ago, so I can tell first hand it is doable), but probably for you it make sense start with existing projects,
Thanks, let me
know you need further information
Serguei Kouzmine