Encodes and decodes .posecode documents to URL-safe share tokens: the
distribution primitive behind Posecode playground
permalinks and embeds. Pure, dependency-free.
npm install posecode-shareimport { buildShareHash, readShareHash } from "posecode-share";
const hash = buildShareHash(myPosecodeSource); // "#doc=…"
const link = `https://posecode.org/play${hash}`;
// On the receiving page:
const source = readShareHash(window.location.hash);Apache-2.0