MCPcopy Index your code
hub / github.com/darkreader/darkreader / isOneOf

Function isOneOf

src/utils/validation.ts:47–49  ·  view source on GitHub ↗
(...values: any[])

Source from the content-addressed store, hash-verified

45}
46
47function isOneOf(...values: any[]) {
48 return (x: any) => values.includes(x);
49}
50
51function hasRequiredProperties<T extends Record<string, unknown>>(obj: T, keys: Array<keyof T>) {
52 return keys.every((key) => obj.hasOwnProperty(key));

Callers 2

validateSettingsFunction · 0.85
validateThemeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected