@hsablonniere What do you think? Would this warning have been enough to save you from the issue you ran into? I'd be happy to change the appearance (make it red? highlight it?) or wording, or consider more technical solutions.
The main issue with a technical solution, is really it's 100% OK to create multiple instances using the same IndexedDB store as long as they aren't being used at the same time. For instance, one might have a "Wipe FS" button that performs:
fs = new FS('cool-app')
$('#wipeButton').on('click', () => {
fs = new FS('cool-app', {wipe: true})
})
(whoa.... it felt weird to write jQuery-esque code. I've been in React-world too long.)
Or another realistic scenario is running fs = new FS('test', {wipe: true}) for each test in a test suite, but then the tests run in serial and the fs variable gets garbage collected between tests.
close #16
@hsablonniere What do you think? Would this warning have been enough to save you from the issue you ran into? I'd be happy to change the appearance (make it red? highlight it?) or wording, or consider more technical solutions.
The main issue with a technical solution, is really it's 100% OK to create multiple instances using the same IndexedDB store as long as they aren't being used at the same time. For instance, one might have a "Wipe FS" button that performs:
(whoa.... it felt weird to write jQuery-esque code. I've been in React-world too long.)
Or another realistic scenario is running
fs = new FS('test', {wipe: true})
for each test in a test suite, but then the tests run in serial and thefs
variable gets garbage collected between tests.