During a recent project exploring Javascript encryption, I added an auto-save feature for the form fields so I didn’t need to constantly repast RSA keys and other configs into the page. I have expanded this into its own library (my first). I used [Krasimir’s boilerplate][1] for the web pack config.


To use it you just need to add a data attribute to the input elements and then the library will then save them to local storage and initialise them on page load for you. Small but mighty for this recent project and a fun exploration into building libraries. QuickSave uses the element type (i.e input or textarea) and the name attribute to generate a storage key for the data.

The library also features a few options for changing its behaviour including things like updating the target data attribute, specifying the storage between either local or session, and the prefix used.