Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function processValue({ type }, value) {
if (type === 'boolean') {
return value === 'true';
} else if (type === 'number') {
return asNumber(value);
}
return value === '' ? undefined : value;
}