0.1.2 • Published 5 years ago

gib2sgf v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

gib2sgf

Function to convert GIB files used by Tygem to SGF.

Usage

The implementation is in wasm, so you need to load the module lazily:

const gib = `
\HS
\[GIBOKIND=Global\]
\[TYPE=0\]
\[SZAUDIO=0\]
...
`;

import("gib2sgf").then(m => {
    console.log("sgf: " + m.convert_gib_to_sgf(gib));
});

If the parsing succeeds, string representing SGF is returned. If parsing fails, undefined is returned.