UNPKG

@speakr/speakr-module-services

Version:
21 lines (17 loc) 386 B
"use strict"; module.exports = { publicData }; function publicData(options) { // 1. Get the group base object const groups = options.groups; // 2. Delete the options group delete options.groups; // 3. Reset the options group return Promise.resolve(options.groups = groups.map(group => { return { name: group.name, id_hash: group.id_hash, } })); }