Something went wrong. Try again.
Sync your Obsidian vault to an atproto PDS community.obsidian.md/plugins/pds-sync
Something went wrong. Try again.
551 B · 16 lines
TypeScript
at main
1234567891011121314151617/** `pds_publish` replaces `publish`, a property Obsidian Publish owns. */
export const FLAG_PRIVATE = "pds";export const FLAG_PUBLIC = "pds_publish";
export type FlagKey = typeof FLAG_PRIVATE | typeof FLAG_PUBLIC;
const TRUE_TEXT = new Set(["true", "yes", "on"]);
/** Obsidian may store the flag as text instead of a checkbox, so accept both. */export function flagged(value: unknown): boolean { if (typeof value === "boolean") return value; if (typeof value === "string") return TRUE_TEXT.has(value.trim().toLowerCase()); return false;}