Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

posecode-share

Encodes and decodes .posecode documents to URL-safe share tokens: the distribution primitive behind Posecode playground permalinks and embeds. Pure, dependency-free.

Install

npm install posecode-share

Usage

import { 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);

License

Apache-2.0