Function getGeneratedStatefulFunction

  • Takes an object that describes a function to be created from a function body string

    Example

    getGeneratedStatefulFunction({ variable_name='myFunctionName', function_body='return 3', function_name_prefix='customFunction_', }) => 
    function customFunction_myFunctionName(state){
    'use strict';
    return 3;
    }

    Parameters

    • __namedParameters: GeneratedStatefulFunctionParams

    Returns GeneratedStatefulFunction