aldeed/meteor-simple-schema — pull request #7 by mquandalle (2013-08-20 22:23:13+00:00)
Title: Add a `match` method to the SimpleSchema prototype

`check` is the build-in standard function to do some security check in a Meteor method call. Standard means that for instance the `audit-argument-checks` package require that all arguments passed to methods and publish are giving to this `check` function. That why I think it's not good to redefine another `checkSchema`.

Here is the API proposition:

check(document, mySchema.math())

`mySchema.match()` return a standard `Match.Where` with a function that validate the model as parameter.

I keep the `checkSchema` global function for backwards compatibility, but I think it should eventually leave.