module.exports.isNull = (parameters = []) => {
    if (parameters.length == 0) {
        return { hasNull: true, missingParams: [] };
    }

    const missingParams = parameters
        .map((parameter, index) => ({
            value: parameter,
            index
        }))
        .filter(({ value }) => {
            return value == null || value == undefined || 
                   (typeof value == 'string' &&
                    (value == "" || value.trim() == "" ||
                     value == "undefined" ||
                     value == "null")
                   );
        })
        .map(({ index }) => index);

    return { hasNull: missingParams.length != 0, missingParams };
}
