@ecomplus/utils
Version:
JS utility functions to E-Com Plus (not only) related apps
21 lines • 747 B
TypeScript
export default birthDate;
/**
* @method
* @memberof ecomUtils
* @name birthDate
* @description Returns birth date formatted string from customer body object.
* @param {Object.<string, *>} customer - Customer body object or birth date object with day, month and year
* @returns {string}
*
* @example
* // costumer will be the parameter of this function and as result will return his birth date
* // const customer = object (body customer)
* // customer can be like:
* const costumer = { main_email: 'joejonh@me.com', birth_date: { year: 1990, month: 10, day: 1 } }
* ecomUtils.birthDate(costumer)
* // => "10/1/1990"
*/
declare function birthDate(customer: {
[x: string]: any;
}): string;
//# sourceMappingURL=birth-date.d.ts.map