I would prefer to use the libraries that you can find in `/shared/js/device_storage`, there you have utility functions to get the storage object taking into account the space you want to save into that storage.

That will help us to prevent the cases were we want to save a vcard and we don't have space left on the sdcard.