API Docs for: 0.1.0

Class gabarito.Matcher

Class defined in: lib/gabarito.js:830

The matcher consists of a single function that evaluates whether a given values meets the matcher function criteria.

gabarito.Matcher( matcher, [msg] )
lib/gabarito.js:830
Parameters:
  • matcher <Function>

    The matcher function

  • [msg] <String>

    The error message

Index

Methods

Error error( value, [position] )
lib/gabarito.js:864

Returns the Error instance with the formatted message using the argument's position and the argument itself.

Parameters:
  • value <Mixed>
  • [position] <Number>

Returns: <Error>
Boolean matches( value )
lib/gabarito.js:849

The matcher method should evaluate the matcher function and tell whether the value matches the criteria.

Parameters:
  • value <Mixed>

Returns: <Boolean>