UNPKG

@publidata/utils-data-manager

Version:

Collection of methods to extract data from publidata

47 lines (40 loc) 880 B
const PublidataObject = require("../"); /** * Class representing a meal. * @extends PublidataObject */ class PublidataObjectMeal extends PublidataObject { /** * @return {string} */ get mealType() { const { meal_type } = this.object._source; return this.memoize("mealType", meal_type); } /** * @return {String} */ get name() { const { name } = this.object._source; return this.memoize("name", name); } /** * @return {Array} */ get foods() { const { foods } = this.object._source; return this.memoize("foods", foods); } /** * @return {Array} */ get isThemed() { const { thematic } = this.object._source; return this.memoize("isThemed", thematic); } get color() { const { color } = this.object._source; return this.memoize("color", color); } } module.exports = PublidataObjectMeal;