hara-native 0.1.21

HAL-free native host runtime and package launcher for Hara
Documentation
1
2
3
4
5
6
7
8
9
10
/** Parses the JSON manifests returned by the embedded browser runtime. */
export function parseJson(source) {
  if (typeof source !== "string") throw new TypeError("json/parse expects text");
  try {
    return JSON.parse(source);
  } catch (error) {
    const message = error instanceof Error ? error.message : String(error);
    throw new Error(`json/parse: ${message}`);
  }
}