UNPKG

@speakr/speakr-module-services

Version:
22 lines (18 loc) 434 B
"use strict"; module.exports = { publicData }; function publicData(options) { // 1. Get the agency base object const brands = options.brands; // 2. Delete the options agency delete options.brands; // 3. Reset the options agency return Promise.resolve(options.brands = brands.map(brand => { return { name: brand.name, id_hash: brand.id_hash, network_id_hash: brand.network.id_hash } })); }