Skip to content

Instantly share code, notes, and snippets.

@goofballLogic
Created April 13, 2026 11:24
Show Gist options
  • Select an option

  • Save goofballLogic/0b99a2573e8aef45025c84ea0ddcd4bf to your computer and use it in GitHub Desktop.

Select an option

Save goofballLogic/0b99a2573e8aef45025c84ea0ddcd4bf to your computer and use it in GitHub Desktop.
const validatePizza = (layers, rules) =>
rules.find(([a, b]) => layers.indexOf(a) > layers.indexOf(b)) || true;
@004Ongoro
Copy link
Copy Markdown

This is a super slick one-liner! Haven't benchmarked it yet, but I love how readable it stays despite being so compact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment