NestJS - Pipes
Consider this NestJS pipe code snippet:
What is the bug in this pipe when input is
transform(value: any) {
const num = parseInt(value);
if (!num) {
throw new Error('Invalid number');
}
return num;
}What is the bug in this pipe when input is
'0'?