mirror of
https://github.com/hanzoai/forum.git
synced 2026-09-30 21:51:19 +00:00
18 lines
373 B
JavaScript
18 lines
373 B
JavaScript
import Helper from "@ember/component/helper";
|
|
import { service } from "@ember/service";
|
|
import { camelize } from "@ember/string";
|
|
|
|
export default class ChatGuardianHelper extends Helper {
|
|
@service chatGuardian;
|
|
|
|
compute(inputs) {
|
|
const [key, ...params] = inputs;
|
|
|
|
if (!key) {
|
|
return;
|
|
}
|
|
|
|
return this.chatGuardian[camelize(key)]?.(...params);
|
|
}
|
|
}
|