Skip to content

Instantly share code, notes, and snippets.

@sergueyarellano
Created May 26, 2021 14:25
Show Gist options
  • Save sergueyarellano/a19e6a745748b87bb254891d517e551c to your computer and use it in GitHub Desktop.
Save sergueyarellano/a19e6a745748b87bb254891d517e551c to your computer and use it in GitHub Desktop.
function complyWith (input, restrictions) {
const formattedRestrictions = substituteOperators(restrictions)
return Array.isArray(input)
? input.every(element => formattedRestrictions.every(applyOperator(element)))
: formattedRestrictions.every(applyOperator(input))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment