That should work... My tests for contains seem to pass. I should do proper unit tests, but I figure if my manual tests pass it should work in many circumstances.
Ok... I tested this minial version in both Chrome and Sphere and you'll be shocked. It doesn't work in Sphere.
var statuses = [
{ id: 0, statDef: { tags: ["heal", "death", "burn"] } },
{ id: 1, statDef: { tags: ["heal", "spark"] } },
{ id: 2, statDef: { tags: ["drain", "turn"] } }
];
Link(statuses).where(function(status) { return Link(status.statDef.tags).some(["burn", "drain"]); }).each(function(status) {
console.log(status.id); // I get 0 and 2 in chrome; nothing in Sphere
});
However if the array has 1 item in it, it works in both chrome and Sphere. I don't know exactly how to solve this since there are no runtime errors. :/
Edit:
Nevermind, it works in both. I forgot to update the version. I honestly don't know why it doesn't work for you. Try running the code above, it should work no different.