The Changelog

Open Source moves fast. Keep up.

backbone_query – MongoDB-like query interface to Backbone collections

Nice JavaScript add-on for Backbone from Dave Tonge that provides a MongoDB-like query API for your collections:

  // Models must match all these queries
    title: {$like: "news"}, // Title attribute contains the string "news"
    likes: {$gt: 10}}, // Likes attribute is greater than 10

  // Models must match one of these queries
    featured: true, // Featured attribute is true
    //Category attribute is either "code", "programming", or "javascript"

Check the README for usage.

Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.