BasicMath.sayHello()

Log a hello message with a generated secret code and other information

This example machine is part of machinepack-boilerplate, used to introduce everyone to machines.

Usage

Hover over inputs/exits for more info.

var BasicMath = require('machinepack-basicmath');


// Log a hello message with a generated secret code and other information

BasicMath.sayHello({

name: 'John',

email: 'example@example.com',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// User entered wrong email format

wrongEmailFormat: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

name required

The name of the person that will be sent the hello message.

'John'
email required

The email of the person that will be sent the hello message to.

'example@example.com'

Exits

error

An unexpected error occurred.

wrongEmailFormat

User entered wrong email format

success

OK.

{ numLettersInName: 4,
  secretCode: 'e9ec627220bc9e8ca66f916b7fba92f3' }