Consume a Project Function

Consume a project function to use in your project.

const fn = require('linkapi-sdk/core/fn');

const result = await fn.execute('yourFunction', 'param1', 'param2');

Get a project function file and store in a variable. Call the method when you want.

const fn = require('linkapi-sdk/core/fn');

const myFunc = await fn.get('yourFunction');

const result1 = await myFunc('param1'); // first call

const result2 = await myFunc('param2'); // second call