zephyr-edge-contract
Version:
Edge contract for Zephyr
17 lines (16 loc) • 636 B
JavaScript
const ZEPHYR_BUILD_TARGETS = [
'web',
'ios',
'android',
'tap-app'
];
function isZephyrBuildTarget(value) {
return 'string' == typeof value && ZEPHYR_BUILD_TARGETS.includes(value);
}
function assertZephyrBuildTarget(value, optionName = 'target') {
if (isZephyrBuildTarget(value)) return;
const received = 'string' == typeof value ? JSON.stringify(value) : String(value);
throw new TypeError(`${optionName} must be one of ${ZEPHYR_BUILD_TARGETS.join(', ')}; received ${received}.`);
}
export { ZEPHYR_BUILD_TARGETS, assertZephyrBuildTarget, isZephyrBuildTarget };
//# sourceMappingURL=build-target.mjs.map