Closed BlueAccords closed 6 years ago
hey, @BlueAccords , Good Observation and Nice Suggestion.
we could convert each operand into a mutual data type maybe into strings.
this will solve the issue without passing extra option expectedType
.
@BlueAccords, Published 1.0.3
on NPM. Though I have written test case, Can you please try installing 1.0.3
and let me know if this solves your issue?.
Yeah it seems to be working, thanks for the update! There's also another issue I need to solve but i'll make a separate issue for it.
For this line
It will not compare values correctly if one is a string (like
req.params.id
) and one is a number(likereq.user.id
).Any ideas on the best way to fix this without any unwanted side effects? Maybe include another option to convert the resource to?
Like
expectedType: 'number'
will callNumber()
onfirstOperand
?