Cotton code
18 lines · 602 B · TypeScriptRaw
/** * A WhatsApp group's import identity: cotton-rules' `import::group` * (crates/cotton-rules/src/import/group.rs; the event grammar stays with the * Mac's readers), asked through the rules module. */import { rule } from "../rules/index.ts";export const GROUP_EXTERNAL_KEY_PREFIX = "wa:group:";/** A title as its slug: what a group's external key is made of. */export function slugifyTitle(title: string): string {  return rule<string>("group.slug", title);}/** `wa:group:<slug>`. */export function groupExternalKey(title: string): string {  return rule<string>("group.key", title);}