Wynn Netherland changelog.com/posts

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.


Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00