misskey/src/remote/activitypub/misc/get-emoji-names.ts

7 lines
186 B
TypeScript
Raw Normal View History

import parse from '../../../mfm/parse';
export default function(text: string) {
if (!text) return [];
return parse(text).filter(t => t.type === 'emoji').map(t => (t as any).emoji);
}