input checking for db.set
- Dominant language
- JavaScript
- Stars
- 619
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.