Skip to content

Instantly share code, notes, and snippets.

@sergueyarellano
Created May 26, 2021 14:18
Show Gist options
  • Save sergueyarellano/369bb80ffdc6cccda02fa02035132ca9 to your computer and use it in GitHub Desktop.
Save sergueyarellano/369bb80ffdc6cccda02fa02035132ca9 to your computer and use it in GitHub Desktop.
function isValidInterface (input, model) {
return Array.isArray(input)
? input.every(element => Object.keys(element).every(checkTypeWith(element, model)))
: Object.keys(input).every(checkTypeWith(input, model))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment