1.0.0 • Published 4 years ago
typestub-node-lmdb v1.0.0
typestub-node-lmdb
Typescript wrapper around node-lmdb, with some improvement.
Basically same as node-lmdb, except:
beginTxn()is exposed only after theenvis opened- extended
txnto includeclear,getObject, andputObjectmethods
| additional method | explanation |
|---|---|
| clear | try to delete, will not throw error if the key doesn't exist |
| getObject | wrap around getString with JSON.stringify* |
| putObject | wrap around putString with JSON.parse* |
*: exception raised from JSON.stringify/parse is not handled