How to search a Backbone collection with "any"?

457 Views Asked by At

Yesterday I found a code to search a Backbone collection using a any() function rather that something like.

var myItem Collection.findWhere(...)
if (myItem)
{
}

But my file as been erased by TypeScript and "any" is such a vague keyword I can't find it back.

1

There are 1 best solutions below

0
T J On

any is an alias of some. It's mixed into Backbone.collection so you can just do collection.some() or collection.any()