You're right! I had forgotten about that. I updated the blog post. Truth be told, I'm not sure it's an improvement because it feels like a quirk whereas casting to a number type feels a bit more "commonstream".
Hi there!
Instead of using Number() on both includes-results, you can just use "itemB.labels.includes('foo') - itemA.labels.includes('foo')".
This works because minus will convert both sides to a number anyway before subtracting.
Best regards
Comment
You're right! I had forgotten about that. I updated the blog post.
Truth be told, I'm not sure it's an improvement because it feels like a quirk whereas casting to a number type feels a bit more "commonstream".
Parent comment
Hi there! Instead of using Number() on both includes-results, you can just use "itemB.labels.includes('foo') - itemA.labels.includes('foo')". This works because minus will convert both sides to a number anyway before subtracting. Best regards