Registry / web-framework / yox-expression-compiler

yox-expression-compiler

JSON →
library0.18.0jsnpmunverified

An expression compiler for Yox.js, version 0.18.0. It compiles template expressions into executable code for reactive rendering. Part of the Yox.js ecosystem, this package is designed to work with yox-common and is maintained as part of the broader Yox framework. It offers a lightweight, performant alternative to larger template compilers by focusing specifically on expression compilation.

npm install yox-expression-compiler
INSTALL
IMPORT
SIG · YOX-EXPRESSION-COM
Y
yox-expression-compiler
web-frameworkjavascriptv0.18.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

compileExpression
import { compileExpression } from 'yox-expression-compiler'
const compileExpression = require('yox-expression-compiler');
Package is ESM-only since v0.18.0; CommonJS require is not supported.
Expression
import type { Expression } from 'yox-expression-compiler'
import { Expression } from 'yox-expression-compiler'
Expression is a TypeScript type, not a runtime value. Use type import.
createExpression
import { createExpression } from 'yox-expression-compiler'
import createExpression from 'yox-expression-compiler'
This is a named export, not a default export.

Demonstrates basic usage of compileExpression to compile a simple arithmetic expression.

import { compileExpression } from 'yox-expression-compiler'; const expr = "a + b"; const compiled = compileExpression(expr); console.log(compiled); // { code: 'var _f = function(a,b) { return a + b; };', ... }
Debug
Known issues
breakingRemoved default export in version 0.18.0; all exports are now named.
fix
Use named imports like `import { compileExpression } from 'yox-expression-compiler'` instead of default import.
affects: >=0.18.0
breakingyox-common peer dependency updated to ^0.20.0; incompatible with older versions.
fix
Ensure yox-common version 0.20.0 or compatible is installed in your project.
affects: >=0.18.0
gotchaExpression types are only available in TypeScript projects; plain JavaScript users cannot import them.
fix
If using JavaScript, avoid importing type-only symbols.
affects: *
Errors
Common errors & fixes
Cannot find module 'yox-expression-compiler' or its corresponding type declarations.
Missing or mismatched peer dependency or incorrect import path.
fix
Ensure yox-common is installed and correct version: npm install yox-common@^0.20.0
Attempted import error: 'compileExpression' is not exported from 'yox-expression-compiler'.
Using a version prior to 0.18.0 where the function may have different name or not exported.
fix
Upgrade to version 0.18.0 and use named import as documented.
Upgrade
Version history
0.18.0latest on npm
Audit
Dependencies
yox-commonrequiredRequired peer dependency for shared utilities and runtime features.
Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
yox-expression-compiler — npm install yox-expression-compiler · libregistry