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/api/assets/functions/functionObject.js

31 lines
1.7 KiB
JavaScript
Raw Normal View History

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