@instantdb/core
Advanced tools
Comparing version 0.14.25 to 0.14.26
@@ -98,2 +98,19 @@ import { test, expect } from "vitest"; | ||
).toEqual(["joe", "stopa"]); | ||
expect( | ||
query( | ||
{ store }, | ||
{ | ||
users: { | ||
$: { | ||
where: { | ||
handle: { $in: ["stopa", "joe"] }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
) | ||
.data.users.map((x) => x.handle) | ||
.sort(), | ||
).toEqual(["joe", "stopa"]); | ||
}); | ||
@@ -728,2 +745,2 @@ | ||
]); | ||
}); | ||
}); |
@@ -23,4 +23,5 @@ "use strict"; | ||
function matchWithArgMap(patternPart, triplePart, context) { | ||
const { in: inList } = patternPart; | ||
if (inList && inList.includes(triplePart)) { | ||
const { in: inList, $in: $inList } = patternPart; | ||
if ((inList && inList.includes(triplePart)) || | ||
($inList && $inList.includes(triplePart))) { | ||
return context; | ||
@@ -27,0 +28,0 @@ } |
@@ -17,4 +17,5 @@ // 1. patternMatch | ||
function matchWithArgMap(patternPart, triplePart, context) { | ||
const { in: inList } = patternPart; | ||
if (inList && inList.includes(triplePart)) { | ||
const { in: inList, $in: $inList } = patternPart; | ||
if ((inList && inList.includes(triplePart)) || | ||
($inList && $inList.includes(triplePart))) { | ||
return context; | ||
@@ -21,0 +22,0 @@ } |
@@ -426,3 +426,3 @@ import { create } from "mutative"; | ||
} | ||
const values = v.in ? v.in : [v]; | ||
const values = v.in || v.$in ? (v.in || v.$in) : [v]; | ||
for (const value of values) { | ||
@@ -429,0 +429,0 @@ const triple = m.get(value); |
@@ -438,3 +438,3 @@ "use strict"; | ||
} | ||
const values = v.in ? v.in : [v]; | ||
const values = v.in || v.$in ? (v.in || v.$in) : [v]; | ||
for (const value of values) { | ||
@@ -441,0 +441,0 @@ const triple = m.get(value); |
{ | ||
"name": "@instantdb/core", | ||
"version": "v0.14.25", | ||
"version": "v0.14.26", | ||
"description": "Instant's core local abstraction", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -21,4 +21,7 @@ // 1. patternMatch | ||
function matchWithArgMap(patternPart, triplePart, context) { | ||
const { in: inList } = patternPart; | ||
if (inList && inList.includes(triplePart)) { | ||
const { in: inList, $in: $inList } = patternPart; | ||
if ( | ||
(inList && inList.includes(triplePart)) || | ||
($inList && $inList.includes(triplePart)) | ||
) { | ||
return context; | ||
@@ -25,0 +28,0 @@ } |
@@ -478,3 +478,3 @@ import { create } from "mutative"; | ||
const values = v.in ? v.in : [v]; | ||
const values = v.in || v.$in ? (v.in || v.$in) : [v]; | ||
@@ -481,0 +481,0 @@ for (const value of values) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
2405240
42616