Home > @uniformdev/canvas > matchesProjectionPattern

matchesProjectionPattern() function

Tests whether value matches the projection pattern, where * is the only wildcard (zero or more of any character). The matcher is bounded: regex metacharacters in the pattern are escaped during translation so the compiled regex remains linear-time on its input. Compiled regexes are cached per process to keep the hot path (pruner walks every field on every node) cheap. Throws if pattern is invalid.

Signature:

Parameters

Parameter

Type

Description

pattern

string

value

string

Returns:

boolean