Almost MVP
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
export function validateObjectKeys<K extends string>(obj: any, keys: K[]): boolean {
|
||||
const keySet = new Set(keys)
|
||||
|
||||
// @ts-ignore
|
||||
return Object.keys(obj).every(key => keySet.has(key))
|
||||
}
|
||||
Reference in New Issue
Block a user