zcatalyst-integ-cliq
Version:
Node.js SDK for integrating Zoho Catalyst with Zoho Cliq
22 lines (21 loc) • 531 B
JavaScript
export default class SuggestionList {
newSuggestionObject(text, icon) {
const suggestion = new SuggestionObject(text);
if (icon) {
suggestion.icon = icon;
}
return suggestion;
}
addSuggestion(...suggestion) {
if (this.list === undefined) {
this.list = suggestion;
return this.list.length;
}
return this.list.push(...suggestion);
}
}
export class SuggestionObject {
constructor(text) {
this.text = text;
}
}