wasm-bindgen 0.2.47

Easy support for interacting between JS and Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export function test_string_roundtrip(f) {
  const test = expected => {
    const actual = f(expected);
    if (actual === expected)
      return;
    throw new Error(`string roundtrip "${actual}" != "${expected}"`);
  };

  test('');
  test('a');
  test('💖');

  test('a longer string');
  test('a longer 💖 string');
}