Created
June 7, 2017 08:51
-
-
Save keithwhor/041bf4ecce00af9de0f5f8cfdb8c6130 to your computer and use it in GitHub Desktop.
FaaSlang Example Function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a FaaSlang-compliant function. It uses a modified ESDoc/JSDoc | |
* parser to read comments and determine types to implement type-safety | |
* mechanisms at execution time, or can intuit types based on default. | |
* It also performs static analysis to ensure comments match function footprints. | |
* @param {string} name Your name | |
* @param {string} age Your age | |
* @returns {string} | |
*/ | |
module.exports = (name = 'Arya Stark', age = 18, context, callback) => { | |
callback(null, `Hello ${name}, you are ${age} years old.`); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment