@ocap/indexdb-memory 1.30.14 → 1.30.16

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/esm/db/base.mjs CHANGED
@@ -454,12 +454,8 @@ var LocalBaseIndexDB = class extends BaseIndexDB {
454
454
  const symbolScore = row.symbol ? scoreMatch(row.symbol, lowerKw) : 0;
455
455
  const descScore = row.description ? scoreMatch(row.description, lowerKw) : 0;
456
456
  const score = Math.max(nameScore, symbolScore, descScore);
457
- const title = nameScore >= symbolScore ? row.name || row.symbol || "" : row.symbol || row.name || "";
458
457
  results.push({
459
- ...formatSearchResult("token", {
460
- ...row,
461
- title
462
- }),
458
+ ...formatSearchResult("token", row),
463
459
  score,
464
460
  priority: typePriority.token
465
461
  });
@@ -516,12 +512,8 @@ var LocalBaseIndexDB = class extends BaseIndexDB {
516
512
  const nameScore = row.name ? scoreMatch(row.name, lowerKw) : 0;
517
513
  const monikerScore = row.moniker ? scoreMatch(row.moniker, lowerKw) : 0;
518
514
  const score = Math.max(nameScore, monikerScore);
519
- const title = nameScore >= monikerScore ? row.name || row.moniker || "" : row.moniker || row.name || "";
520
515
  results.push({
521
- ...formatSearchResult("tokenFactory", {
522
- ...row,
523
- title
524
- }),
516
+ ...formatSearchResult("tokenFactory", row),
525
517
  score,
526
518
  priority: typePriority.tokenFactory
527
519
  });
package/lib/db/base.cjs CHANGED
@@ -458,12 +458,8 @@ var LocalBaseIndexDB = class extends _ocap_indexdb.BaseIndexDB {
458
458
  const symbolScore = row.symbol ? scoreMatch(row.symbol, lowerKw) : 0;
459
459
  const descScore = row.description ? scoreMatch(row.description, lowerKw) : 0;
460
460
  const score = Math.max(nameScore, symbolScore, descScore);
461
- const title = nameScore >= symbolScore ? row.name || row.symbol || "" : row.symbol || row.name || "";
462
461
  results.push({
463
- ...(0, _ocap_indexdb.formatSearchResult)("token", {
464
- ...row,
465
- title
466
- }),
462
+ ...(0, _ocap_indexdb.formatSearchResult)("token", row),
467
463
  score,
468
464
  priority: typePriority.token
469
465
  });
@@ -520,12 +516,8 @@ var LocalBaseIndexDB = class extends _ocap_indexdb.BaseIndexDB {
520
516
  const nameScore = row.name ? scoreMatch(row.name, lowerKw) : 0;
521
517
  const monikerScore = row.moniker ? scoreMatch(row.moniker, lowerKw) : 0;
522
518
  const score = Math.max(nameScore, monikerScore);
523
- const title = nameScore >= monikerScore ? row.name || row.moniker || "" : row.moniker || row.name || "";
524
519
  results.push({
525
- ...(0, _ocap_indexdb.formatSearchResult)("tokenFactory", {
526
- ...row,
527
- title
528
- }),
520
+ ...(0, _ocap_indexdb.formatSearchResult)("tokenFactory", row),
529
521
  score,
530
522
  priority: typePriority.tokenFactory
531
523
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ocap/indexdb-memory",
3
3
  "description": "OCAP indexdb adapter that uses memory as backend, just for test purpose",
4
- "version": "1.30.14",
4
+ "version": "1.30.16",
5
5
  "type": "module",
6
6
  "author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)",
7
7
  "bugs": {
@@ -78,10 +78,10 @@
78
78
  },
79
79
  "gitHead": "87990c8b5e215107fc587c1ced0d6b3e2cd2483e",
80
80
  "dependencies": {
81
- "@arcblock/did": "1.30.14",
82
- "@ocap/indexdb": "1.30.14",
83
- "@ocap/types": "1.30.14",
84
- "@ocap/util": "1.30.14",
81
+ "@arcblock/did": "1.30.16",
82
+ "@ocap/indexdb": "1.30.16",
83
+ "@ocap/types": "1.30.16",
84
+ "@ocap/util": "1.30.16",
85
85
  "debug": "^4.4.3",
86
86
  "lodash": "^4.17.23",
87
87
  "lokijs": "^1.5.12"