Skip to content

Make Result instances comparable

Compare
Choose a tag to compare
@supermacro supermacro released this 22 Dec 15:48
· 382 commits to master since this release

#214 changes the match method from being implemented as a instance property to being implemented as a method on the prototype chain.

Therefore all instances of Result share the same reference in their match method. This allows testing libraries like Jest to make appropriate object comparisons / diffs.

Thanks to @bluenote10 for the submission!