Is the check package actually useful?


#1

I’m starting my second meteor project and have just found myself removing the check package again as I find it both annoying and buggy.

For instance I did the following:

Meteor.methods({ foo: function(bar) {
    check(bar, Match.Any);
    ...
}});

I confirmed foo was only receiving 1 argument yet I was still getting a Error: Did not check() all arguments during call to 'foo'.

The only other place so far I had used the check method call I was forced into checking that the values passed were strings (one is a date string) so it seems quite pointless in general and annoying. Am I missing something?


#2

I can not reproduce this. How are you calling your method foo?


#4

well, it is not default behaviour of “check” package.
So you are probably enforcing that check all arguments policy somewhere else.

And there can be other packages messing with it too.


#5

You could also not use audit-argument-checks and just use check on its own if you want to. I feel like it still helps me a lot.