Skip to content

Instantly share code, notes, and snippets.

@srph
Created November 24, 2018 11:11
Show Gist options
  • Save srph/0d4515242329dfbc07f8af0030f23f90 to your computer and use it in GitHub Desktop.
Save srph/0d4515242329dfbc07f8af0030f23f90 to your computer and use it in GitHub Desktop.
TS: Check if an array contains the provided subset
function subsetIncludes(array: any[], value: any): boolean {
return Boolean(
array.find(arrayValue => isSubset(arrayValue, value))
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment