MCPcopy
hub / github.com/directus/directus / isIn

Function isIn

packages/utils/node/array-helpers.ts:1–3  ·  view source on GitHub ↗
(value: string, array: T)

Source from the content-addressed store, hash-verified

1export function isIn<T extends readonly string[]>(value: string, array: T): value is T[number] {
2 return array.includes(value);
3}
4
5export function isTypeIn<T extends { type?: string }, E extends string>(
6 object: T,

Callers 15

addFunction · 0.90
createFunction · 0.90
createExtensionFunction · 0.90
buildFunction · 0.90
buildAppOrApiExtensionFunction · 0.90
generateBundleEntrypointFunction · 0.90
getExtensionDevDepsFunction · 0.90
getCastFlagFunction · 0.90
user.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected