What does this architecture check print?
JavaScript
const rank = { domain: 0, application: 1, adapter: 2 };
const modules = {
order: 'domain',
checkout: 'application',
postgres: 'adapter',
};
const dependencies = [
['checkout', 'order'],
['order', 'postgres'],
];
const invalid = dependencies.filter(
([from, to]) => rank[modules[from]] < rank[modules[to]],
);
console.log(invalid.map((edge) => edge.join(' -> ')));