victorb / trymodule

➰ It's never been easier to try nodejs modules!
1.14k stars 29 forks source link

Save/Restore session #11

Open victorb opened 8 years ago

victorb commented 8 years ago

Something that would be useful to have is a save/restore functionality, where previous entered code and state can be restored in a future session.

  1. User enters trymodule lodash and repl opens with lodash installed
  2. User enters var something = lodash.repeat('WIN', 5)
  3. User enters save()
  4. User closes repl and opens it again with trymodule colors
  5. User enters restore()

And now something and lodash is available in the repl again.

ozantunca commented 8 years ago

I suppose save() and restore() functions should be used as properties of an object such as trymodule.save() to protect them from accidental overrides.