jexidb 1.0.3 → 1.0.4

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/dist/Database.cjs CHANGED
@@ -581,8 +581,10 @@ var Database = exports.Database = /*#__PURE__*/function (_EventEmitter) {
581
581
  return _context8.abrupt("return");
582
582
  case 11:
583
583
  if (!Array.isArray(map)) {
584
- if (map && _typeof(map) === 'object') {
585
- map = _this.indexManager.query(map, options.matchAny);
584
+ if (map instanceof Set) {
585
+ map = _toConsumableArray(map);
586
+ } else if (map && _typeof(map) === 'object') {
587
+ map = _toConsumableArray(_this.indexManager.query(map, options.matchAny));
586
588
  } else {
587
589
  map = _toConsumableArray(Array(_this.offsets.length).keys());
588
590
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jexidb",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "JexiDB is a pure JS NPM library for managing data on disk using JSONL efficiently, without the need for a server.",
5
5
  "main": "./dist/Database.cjs",
6
6
  "module": "./src/Database.mjs",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "scripts": {
14
14
  "test": "node --expose-gc test/test.mjs && exit 1",
15
- "build": "npx babel src/Database.mjs --plugins @babel/plugin-transform-async-generator-functions --out-file-extension .cjs --out-dir dist"
15
+ "prepare": "npx babel src/Database.mjs --plugins @babel/plugin-transform-async-generator-functions --out-file-extension .cjs --out-dir dist"
16
16
  },
17
17
  "author": "EdenwareApps",
18
18
  "license": "MIT",
package/src/Database.mjs CHANGED
@@ -214,8 +214,10 @@ export class Database extends EventEmitter {
214
214
  this.shouldSave && await this.save().catch(console.error)
215
215
  if(this.indexOffset === 0) return
216
216
  if(!Array.isArray(map)) {
217
- if(map && typeof map === 'object') {
218
- map = this.indexManager.query(map, options.matchAny)
217
+ if (map instanceof Set) {
218
+ map = [...map]
219
+ } else if(map && typeof map === 'object') {
220
+ map = [...this.indexManager.query(map, options.matchAny)]
219
221
  } else {
220
222
  map = [...Array(this.offsets.length).keys()]
221
223
  }
Binary file
package/test/test-v8.jdb CHANGED
Binary file