1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/packages/lib/services/plugins/utils/validatePluginPlatforms.ts

13 lines
289 B
TypeScript

const validatePluginPlatforms = (platforms: string[]) => {
if (!platforms) {
return;
}
if (!Array.isArray(platforms) || platforms.some(p => typeof p !== 'string')) {
throw new Error('If specified, platforms must be a string array');
}
};
export default validatePluginPlatforms;