parent
037837b551
commit
0e4a111f81
1714 changed files with 20803 additions and 11751 deletions
|
@ -1,10 +0,0 @@
|
|||
import * as mfm from 'mfm-js';
|
||||
import { unique } from '@/prelude/array';
|
||||
|
||||
export function extractCustomEmojisFromMfm(nodes: mfm.MfmNode[]): string[] {
|
||||
const emojiNodes = mfm.extract(nodes, (node) => {
|
||||
return (node.type === 'emojiCode' && node.props.name.length <= 100);
|
||||
});
|
||||
|
||||
return unique(emojiNodes.map(x => x.props.name));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue