fluxo-js / fluxo

Fluxo is a simple, lightweight (~300LOC) and dependency free data infrastructure lib based on Facebook Flux and Backbone.js. It's compatible with React.js, but you can use with whatever you want to the view/component layer.
15 stars 3 forks source link

Implement CollectionStore#findWhere #48

Closed sobrinho closed 8 years ago

sobrinho commented 8 years ago

What do you think?

let collection = new Fluxo.CollectionStore([
  {id: 1, responsible: false},
  {id: 2, responsible: false},
  {id: 3, responsible: true}
]);

let responsible = collection.findWhere({responsible: true});

Essentially is the same as collection.where({responsible: true})[0] but with better API.

sobrinho commented 8 years ago

Nevermind, we already have, just missing the documentation, I will fix it.

sobrinho commented 8 years ago

See ca9acb663d036594674788381633beb7ed14fe0c