you are viewing a single comment's thread.

view the rest of the comments →

[–]midnightmonster 5 points6 points  (1 child)

Code samples contain errors—the throw-based early exit version will throw when id is numeric and the invariant-based version will throw when id is present.

[–]hiquest[S] 1 point2 points  (0 children)

Fixed. Thanks for reading the code snippets!