first commit

This commit is contained in:
becarta
2025-05-16 00:17:42 +02:00
parent ea5c866137
commit bacf566ec9
6020 changed files with 1715262 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import { isScalar } from '../nodes/identity.js';
function mapIncludes(ctx, items, search) {
const { uniqueKeys } = ctx.options;
if (uniqueKeys === false)
return false;
const isEqual = typeof uniqueKeys === 'function'
? uniqueKeys
: (a, b) => a === b || (isScalar(a) && isScalar(b) && a.value === b.value);
return items.some(pair => isEqual(pair.key, search));
}
export { mapIncludes };