mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-18 09:35:20 +02:00
8 lines
267 B
TypeScript
8 lines
267 B
TypeScript
|
/* eslint-disable import/prefer-default-export */
|
||
|
|
||
|
export function checkObjectHasProperties(object: any, properties: string[]) {
|
||
|
for (const prop of properties) {
|
||
|
if (!(prop in object)) throw new Error(`Missing property "${prop}": ${JSON.stringify(object)}`);
|
||
|
}
|
||
|
}
|