0

I'm using node-localStorage, which seems to provide a partial copy of localStorage and its semantics for Node. (You have to use methods like localStorage.getItem('foo') to get and set instead of reading or setting localStorage['foo'], but while it's incomplete it looks like a faithful copy.)

One feature of the original localStorage that has been included in the port is a default 5MB quota, which I don't want in the context I am using.

How can I turn off all quotas for node-localstorage?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Christos Hayward
  • 5,777
  • 17
  • 58
  • 113

1 Answers1

2

To set quota you may pass additional parameter to ctor like this

localStorage = new LocalStorage('./scratch', Number.MAX_VALUE);

This will guarantee that you never reach maximum.

kras
  • 51
  • 3