outers
Version:
outers - a all in one package for your day to day use
235 lines • 10.3 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.reverse = exports.underscore = exports.bright = exports.dimmed = exports.gray = exports.cyan = exports.magenta = exports.blue = exports.red = exports.yellow = exports.green = void 0;
const Logs_Constant_1 = require("../Config/Constant/Logs.Constant"); // import color object from color.ts
// function for green
/**
* The "green" function logs each element in an array of "globe" type with the color green and returns
* the original array.
* @param {anyArray} Payload - Payload is a rest parameter that allows the function to accept an
* indefinite number of arguments. In this case, the arguments are of type "globe". The function then
* iterates over each argument using a forEach loop and logs the argument to the console with the color
* green. Finally, the function returns the
* @returns an array of objects of type `globe`.
*/
function green(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.green, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.green} has been executed successfully`,
};
} // end of green
exports.green = green;
// function for yellow
/**
* The "yellow" function logs each payload in yellow color and returns the payloads.
* @param {anyArray} Payload - Payload is a rest parameter that allows the function to accept an
* indefinite number of arguments as an array of type "globe". The function then iterates over each
* element of the array and logs it to the console with the color yellow. Finally, the function returns
* the original array of "globe"
* @returns an array of objects of type `globe`.
*/
function yellow(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.yellow, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.yellow} has been executed successfully`,
};
} // end of yellow
exports.yellow = yellow;
// function for red
/**
* The "red" function logs each payload in red color and returns the payloads.
* @param {anyArray} Payload - Payload is a rest parameter that allows the function to accept an
* indefinite number of arguments as an array of type "globe". The function then iterates over each
* element of the array and logs it to the console with the color red. Finally, the function returns
* the original array of "globe"
* @returns an array of objects of type `globe`.
*/
function red(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.red, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.red} has been executed successfully`,
};
} // end of red
exports.red = red;
// function for blue
/**
* The "blue" function logs each payload in blue color and returns the payloads.
* @param {anyArray} Payload - Payload is a rest parameter that allows the function to accept an
* indefinite number of arguments as an array of globe objects. The function then iterates over each
* globe object in the array and logs its contents to the console with the color blue. Finally, the
* function returns the original array of globe objects.
* @returns The function `blue` is returning an array of `globe` objects.
*/
function blue(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.blue, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.blue} has been executed successfully`,
};
} // end of blue
exports.blue = blue;
// function for magenta
/**
* The function "magenta" logs each element in an array of "globe" type with the color magenta and
* returns the array.
* @param {anyArray} Payload - Payload is a rest parameter that allows the function to accept an
* indefinite number of arguments. In this case, the arguments are of type "globe". The function then
* iterates over each argument using a forEach loop and logs the argument to the console with the
* magenta color using the "color" object
* @returns an array of objects of type `globe`.
*/
function magenta(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.magenta, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.magenta} has been executed successfully`,
};
} // end of magenta
exports.magenta = magenta;
// function for cyan
/**
* The function "cyan" logs the given payloads in cyan color and returns them.
* @param {anyArray} Payload - Payload is a rest parameter that allows the function to accept an
* indefinite number of arguments. In this case, the arguments are of type "globe". The function then
* iterates over each argument using a forEach loop and logs the argument to the console with the color
* cyan. Finally, the function returns the
* @returns The function `cyan` is returning an array of `globe` objects.
*/
function cyan(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.cyan, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.cyan} has been executed successfully`,
};
} // end of cyan
exports.cyan = cyan;
// function for gray
/**
* The "gray" function logs each element in an array of "globe" type with a gray color and returns the
* original array.
* @param {anyArray} Payload - Payload is a rest parameter that allows the function to accept an
* indefinite number of arguments. In this case, the arguments are of type "globe". The function then
* iterates over each argument using a forEach loop and logs the argument to the console with the color
* gray. Finally, the function returns the
* @returns an array of `globe` objects, which is the same as the `Payload` parameter passed to the
* function.
*/
function gray(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.gray, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.gray} has been executed successfully`,
};
} // end of gray
exports.gray = gray;
// function for dimmed
/**
* The "dimmed" function logs each element in an array of "globe" objects with a dimmed color and
* returns the original array.
* @param {anyArray} Payload - Payload is a rest parameter that allows the function to accept an
* indefinite number of arguments. In this case, the arguments are of type "globe", which is not
* defined in the code snippet provided. The function then iterates over each argument using a forEach
* loop and logs the argument to the console with
* @returns The function `dimmed` is returning an array of `globe` objects, which is the same as the
* `Payload` parameter passed to the function.
*/
function dimmed(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.dimmed, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.dimmed} has been executed successfully`,
};
} // end of dimmed
exports.dimmed = dimmed;
// function for bright
/**
* The "bright" function logs each element in an array of "globe" objects with a bright color and
* returns the original array.
* @param {anyArray} Payload - Payload is a rest parameter that allows the function to accept an
* indefinite number of arguments. In this case, the arguments are of type "globe", which is not
* defined in the code snippet provided. The function then iterates over each argument using the
* forEach method and logs the argument to the console with
* @returns The function `bright` is returning an array of `globe` objects after logging each object
* with the `color.bright` property to the console.
*/
function bright(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.bright, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.bright} has been executed successfully`,
};
} // end of bright
exports.bright = bright;
// function for underscore
/**
* The function "underscore" logs each element in an array and returns the array.
* @param {anyArray} Payload - Payload is a rest parameter that allows the function to accept an
* indefinite number of arguments. In this case, the arguments are of type "globe". The function then
* iterates over each argument using the forEach method and logs it to the console with an underscore
* color. Finally, the function returns the original
* @returns an array of `globe` objects, which is the same as the `Payload` parameter passed to the
* function.
*/
function underscore(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.underscore, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.underscore} has been executed successfully`,
};
} // end of Underscore
exports.underscore = underscore;
// function for reverse
/**
* The function "reverse" takes in an array of "globe" type and logs each element in reverse order
* while returning the original array.
* @param {anyArray} Payload - The parameter `Payload` is an array of `globe` type elements. The
* `reverse` function takes this array as input and logs each element in reverse order using the
* `console.log` function. Finally, the function returns the same array in reverse order.
* @returns an array of `globe` elements after logging each element in the array to the console with
* the color `reverse`.
*/
function reverse(...Payload) {
Payload.forEach((payload) => {
console.log(Logs_Constant_1.color.reverse, payload);
});
return {
Status: "Success",
Payload,
Message: `The function ${Logs_Constant_1.color.reverse} has been executed successfully`,
};
} // end of Underscore
exports.reverse = reverse;
//# sourceMappingURL=Console.log.js.map