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
2020-03-19 19:49:43 +01:00

25 lines
1.3 KiB
JavaScript

const { randomNumberOutput } = require('./main/randomNumber');
const { convertArabicToRomanOutput, convertRomanToArabicOutput } = require('./main/convertRomanArabicNumbers');
const { convertDistanceOutput } = require('./main/convertDistance');
const { convertTemperatureOutput } = require('./main/convertTemperature');
const { armstrongNumberOutput } = require('./main/armstrongNumber');
const { weatherRequestOutput } = require('./main/weatherRequest');
const { convertCurrencyOutput } = require('./main/convertCurrency');
const functionObject = {
randomNumber : randomNumberOutput,
convertArabicToRoman: convertArabicToRomanOutput,
convertRomanToArabic: convertRomanToArabicOutput,
convertDistance : convertDistanceOutput,
convertTemperature : convertTemperatureOutput,
armstrongNumber : armstrongNumberOutput,
weatherRequest : weatherRequestOutput,
convertCurrency : convertCurrencyOutput
};
// Choisi la fonction à exécuter
function functionToExecute(option) {
return functionObject[option];
}
module.exports = functionToExecute;