2020-03-17 12:02:12 +01:00
|
|
|
const { randomNumberOutput } = require('./main/randomNumber');
|
|
|
|
const { convertArabicToRomanOutput, convertRomanToArabicOutput } = require('./main/convertRomanArabicNumbers');
|
2020-03-17 18:35:03 +01:00
|
|
|
const { convertDistanceOutput } = require('./main/convertDistance');
|
|
|
|
const { convertTemperatureOutput } = require('./main/convertTemperature');
|
|
|
|
const { armstrongNumberOutput } = require('./main/armstrongNumber');
|
2020-03-17 19:37:45 +01:00
|
|
|
const { weatherRequestOutput } = require('./main/weatherRequest');
|
2020-03-19 19:49:43 +01:00
|
|
|
const { convertCurrencyOutput } = require('./main/convertCurrency');
|
2020-03-19 21:46:54 +01:00
|
|
|
const { calculateAgeOutput } = require('./main/calculateAge');
|
2020-03-20 11:45:19 +01:00
|
|
|
const { heapAlgorithmOutput } = require('./main/heapAlgorithm');
|
2020-03-20 12:21:23 +01:00
|
|
|
const { convertEncodingOutput } = require('./main/convertEncoding');
|
2020-03-17 12:02:12 +01:00
|
|
|
|
|
|
|
const functionObject = {
|
2020-03-17 18:35:03 +01:00
|
|
|
randomNumber : randomNumberOutput,
|
|
|
|
convertArabicToRoman: convertArabicToRomanOutput,
|
|
|
|
convertRomanToArabic: convertRomanToArabicOutput,
|
|
|
|
convertDistance : convertDistanceOutput,
|
|
|
|
convertTemperature : convertTemperatureOutput,
|
2020-03-17 19:37:45 +01:00
|
|
|
armstrongNumber : armstrongNumberOutput,
|
2020-03-19 19:49:43 +01:00
|
|
|
weatherRequest : weatherRequestOutput,
|
2020-03-19 21:46:54 +01:00
|
|
|
convertCurrency : convertCurrencyOutput,
|
2020-03-20 11:45:19 +01:00
|
|
|
calculateAge : calculateAgeOutput,
|
2020-03-20 12:21:23 +01:00
|
|
|
heapAlgorithm : heapAlgorithmOutput,
|
|
|
|
convertEncoding : convertEncodingOutput
|
2020-03-17 12:02:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
// Choisi la fonction à exécuter
|
|
|
|
function functionToExecute(option) {
|
|
|
|
return functionObject[option];
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = functionToExecute;
|