This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/backend/assets/functions/functionObject.js

24 lines
715 B
JavaScript
Raw Normal View History

const { randomNumberOutput } = require('./main/randomNumber');
const { convertArabicToRomanOutput, convertRomanToArabicOutput } = require('./main/convertRomanArabicNumbers');
const functionObject = {
randomNumber: {
functionOutput: randomNumberOutput,
args: ["min", "max"]
},
convertArabicToRoman: {
functionOutput: convertArabicToRomanOutput,
args: ["number"]
},
convertRomanToArabic: {
functionOutput: convertRomanToArabicOutput,
args: ["romanNumber"]
}
};
// Choisi la fonction à exécuter
function functionToExecute(option) {
return functionObject[option];
}
module.exports = functionToExecute;