jexidb 1.0.6 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +2 -2
- package/README.md +2 -1
- package/dist/Database.cjs +419 -322
- package/package.json +2 -1
- package/src/Database.mjs +115 -106
- package/src/FileHandler.mjs +68 -49
- package/src/Serializer.mjs +4 -1
- package/test/test-v8-compressed.jdb +0 -0
- package/test/test-v8.jdb +0 -0
- package/test/test.mjs +8 -3
package/.gitattributes
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# Auto detect text files and perform LF normalization
|
|
2
|
-
* text=auto
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
package/README.md
CHANGED
|
@@ -26,7 +26,8 @@ To create a new instance of the database, you need to provide a file path where
|
|
|
26
26
|
import { Database } from 'jexidb'; // ESM
|
|
27
27
|
|
|
28
28
|
const db = new Database('path/to/database.jdb', { // file will be created if it does not already exist
|
|
29
|
-
v8: false, //
|
|
29
|
+
v8: false, //
|
|
30
|
+
create: true, // create the file if it does not exist (default is true)
|
|
30
31
|
compress: false, // set to true to compress each entry
|
|
31
32
|
compressIndex: false, // set to true to compress the index only
|
|
32
33
|
indexes: { // keys to use in queries, only those key values are kept in memory, so fewer specified keys lead to improved performance
|