Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function hasValidKeys(value: Object, keys: Array): boolean {
if (!is.plainObject(value) || !is.array(keys)) {
return false;
}
return Object.keys(value).every(d => keys.includes(d));
}
export function validateSteps(steps: Array, debug: boolean = false): boolean {
if (!is.array(steps)) {
log({
title: 'validateSteps',
data: 'steps must be an array',
warn: true,
debug,
});
return false;
}
return steps.every(d => validateStep(d, debug));
}