Motivation
The method allows to compare store value with another value wrote as literal or contained in another store.
$isEquals
will be store with true
if value in first
and second
is equals by comparing them with ===
Arguments
first: Store<T> | T
— A value or the store to compare with second
second: Store<T> | T
— A value or the store to be compared with first
Returns
$isEquals: Store<boolean>
— The store contains true
if values is equals
Example
Try it
Composition
The equals
operator can be composed with any other method of patronum:
Alternative
Compare to literal value:
Compare to another store: