I’d write this block as such:

```coffee
return candidateLinks
  .filter((link) -> link.firstMatch != -1)
  .sort((a, b) -> a.wordCount - b.wordCount or a.firstMatch - b.firstMatch)
```