given you might want to expand on this what about the following structure?:

```js

// then in theory you can move this to its own file...
var Filter = {
  any: function(needle, haystack) {
     return haystack.indexOf(needle) !== -1;
  },

  validate: function(metadata, filter) {
    for (var key in filter) {
      if (!(key in metadta)) return false;

       // do property matching based on the methods here...
    }
  }

};

```