wasm_thread 0.3.3

An std thread replacement for wasm32 target
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Extracts current script file path from artificially generated stack trace
function script_path() {
    try {
        throw new Error();
    } catch (e) {
        let parts = e.stack.match(/(?:\(|@)(\S+):\d+:\d+/);
        return parts[1];
    }
}

script_path()