template-expression-compiler

raw JSON →
0.1.10 verified Fri May 01 auth: no javascript abandoned

A library for parsing and compiling KnockoutJS-inspired template expressions into TAssembly format. Current version 0.1.10. This is a niche, low-dependency tool for converting between template expression syntaxes, primarily targeting the TAssembly ecosystem. It has no recent updates and is not widely used outside its specific context.

error Cannot find module 'template-expression-compiler'
cause Package not installed or not in node_modules.
fix
Run npm install template-expression-compiler.
gotcha Package is essentially abandoned; no updates since early versions. Use only for legacy systems or specific compatibility with TAssembly.
fix Consider alternative template expression compilers or migrate away from KnockoutJS/TAssembly.
deprecated The library has known issues with complex expressions and lacks modern JavaScript support (e.g., optional chaining, nullish coalescing).
fix Stick to simple expressions or manually transpile to supported syntax.
npm install template-expression-compiler
yarn add template-expression-compiler
pnpm add template-expression-compiler

Compiles a KnockoutJS-like template expression into TAssembly format.

import { compile } from 'template-expression-compiler';

const expression = "name + ' (' + age + ')'";
const tassembly = compile(expression);
console.log(tassembly);
// Output: TAssembly expression string