Add matchStrict to avoid type coercion
Opened this issue · 1 comments
andrei-cocorean commented
Hi, what do you think about adding a matchStrict
function that uses strict equality for primitive types? e.g.
matchStrict({ x: 3 }, { x: '3' }) === false
isaacs commented
I'd be fine with that. Patch welcome. You can look at https://github.com/tapjs/tsame to see how it's strict/loose behavior is implemented.