1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-18 09:35:20 +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;