wasm-rquickjs-cli 0.5.3

Tool for wrapping JavaScript modules as WebAssembly components using the QuickJS engine
1
2
3
4
5
6
7
8
9
10
11
12
13
import assert from 'assert';
import { Liquid } from 'liquidjs';

export const run = async () => {
  const engine = new Liquid();
  const output = await engine.parseAndRender(
    'Hello, {{ user.name | upcase }}! You have {{ count | plus: 2 }} tasks.',
    { user: { name: 'ada' }, count: 3 }
  );

  assert.strictEqual(output, 'Hello, ADA! You have 5 tasks.');
  return 'PASS: parseAndRender handles interpolation and built-in filters';
};