input checking for db.set
- Lingua principale
- JavaScript
- Stelle
- 619
- Fork
- 64
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
felix,
i'm not sure what your end goal with dirty is, but i definitely respect your vision to keep it small. that said, there are some cases for which you might want to check inputs.
specifically:
```
db = require( "dirty" )( "test.db" );
db.set();
db = require( "dirty" )( "test.db" );
```
results in `Error: Could not load corrupted row: {}`.
also,
```
dirty = require( "dirty" );
db = dirty( "test.db" );
db.set( "someKey", function(){} );
db.get( "someKey" ); // [Function]
db = dirty( "test.db" );
db.get( "someKey" ); // undefined
```
the function will be persisted to memory but not to disk, meaning that the two are no longer consistent. this is clearly an edge case, but i was wondering where you see taking dirty in terms of preventing this kind of disparity/corruption.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.