Internationalisation
Bundled Plugins API
If
A Statement that will check if a resolvable matches a predicate, then executes other resolvables.

Submodules

API Overview

  • Constructors - API calls which return an object, typically one that offers API methods
  • If
  • Methods - API calls which can only be made on an object returned by a constructor
  • Are
  • AreNot
  • Is
  • IsNot
  • Matches
  • Then

API Documentation

Constructors

If

Signature
cp.rx.go.If(value) -> If
Type
Constructor
Description
Creates a new If Statement which will check the first result of value.
Parameters
  • requirement - a resolvable value that will be checked.
Returns
  • The Statement instance which will check if the resolvable matches the requirement.

Methods

Are

Signature
cp.rx.go.If:Are(value) -> If.Are
Type
Method
Description
Specifies the value to check.
Parameters
  • value - The value to wait for.

AreNot

Signature
cp.rx.go.If:AreNot(value) -> If.AreNot
Type
Method
Description
Specifies the value to check.
Parameters
  • value - The value to not match.

Is

Signature
cp.rx.go.If:Is(value) -> If.Is
Type
Method
Description
Specifies the value to check.
Parameters
  • value - The value to check for.

IsNot

Signature
cp.rx.go.If:IsNot(value) -> If.IsNot
Type
Method
Description
Specifies the value to not match.
Parameters
  • value - The value to check for.

Matches

Signature
cp.rx.go.If:Matches(predicate) -> If.Matches
Type
Method
Description
Specifies the predicate function that will check the value results.
Parameters
  • predicate - The function that will get called to determine if it has been found.

Then

Signature
cp.rx.go.If:Then(...) -> If.Then
Type
Method
Description
Call this to define what will happen if value resolves successfully.
Parameters
  • ... - The list of resolveable values to process for the successful If result.
Returns
  • The Then Statement.Modifier.
Last modified 1mo ago