MCPcopy Create free account
hub / github.com/Make-md/makemd / parseStickerString

Function parseStickerString

src/shared/utils/stickers.ts:13–23  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

11};
12
13export function parseStickerString(input: string): [string, string] {
14 if (!input) {
15 return ["", ""];
16 }
17 const match = input.match(/^(.*?)\s*\/\/\s*(.*)$/);
18 if (match) {
19 return [match[1], match[2]];
20 } else {
21 return ["", input];
22 }
23}
24export const unifiedToNative = (unified: string) => {
25 const unicodes = unified.split("-");
26 const codePoints = unicodes.map((u) => `0x${u}`);

Callers 5

IconNodeViewFunction · 0.90
getStickerHastFunction · 0.90
modifyTabStickerFunction · 0.90
stickerFromStringFunction · 0.90
PathStickerViewFunction · 0.90

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected