check

Anywhere

check(value, pattern)

import { check } from 'meteor/check' Source

Check that a value matches a pattern. If the value does not match the pattern, throw a Match.Error.

Particularly useful to assert that arguments to a function have the right types and structure.

Arguments

value Any

The value to check

pattern Match Pattern

The pattern to match value against

doc_Meteor
2016-05-29 17:18:04
Comments
Leave a Comment

Please login to continue.