New clean terminal when executing script while returning to old state when closing it
I want to create a script that clears the terminal at the start and when finishing it returns to the old terminal state. Similar to nano, vi, etc. How can I achieve this using Nodejs?