fix: #672 Empty execution tracking ID in InternalLogEntry (backport to release/2k)

This commit is contained in:
jamesread
2025-10-27 15:49:17 +00:00
parent 7483350276
commit 7d020873d6
3028 changed files with 480395 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
import { isPlainObject } from './validateTypes.mjs';
/**
* Check whether the variable is an object and all its properties are one or more values
* that satisfy the specified validator(s):
*
* @example
* ignoreProperties = {
* value1: ["item11", "item12", "item13"],
* value2: "item2",
* };
* validateObjectWithArrayProps(isString)(ignoreProperties);
* //=> true
*
* @typedef {(value: unknown) => boolean} Validator
* @param {...Validator} validators
* @returns {Validator}
*/
export default function validateObjectWithArrayProps(...validators) {
return (value) => {
if (!isPlainObject(value)) {
return false;
}
return Object.values(value)
.flat()
.every((item) => validators.some((v) => v(item)));
};
}