Registry / serialization / llp-script

llp-script

JSON →
library0.5.0jsnpmunverified

A simple and safe JavaScript subset transpiler designed for LLP (Low-Latency Platform) customization, currently at version 0.5.0. The project appears to be in early development with a single commit on GitHub. It provides a transpiler that converts a restricted subset of JavaScript to compatible code, focusing on safety and simplicity for embedded customization scenarios. Compared to more comprehensive transpilers like Babel or TypeScript, llp-script is minimal and targeted. The release cadence is unknown; the latest version is 0.5.0, and there is no recent activity.

npm install llp-script
INSTALL
IMPORT
SIG · LLP-SCRIPT
L
llp-script
serializationjavascriptv0.5.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.

transpile
import { transpile } from 'llp-script'
const transpile = require('llp-script').transpile
The package is ESM-only. CommonJS require is not supported.
parse
import { parse } from 'llp-script'
import { parse } from 'llp-script/parse'
Only named exports are provided. Default export is not available.
default
import llp from 'llp-script'
import * as llp from 'llp-script'
There is a default export that is the transpile function itself, but using named import for transpile is more explicit.

Shows basic usage of transpiling a file from llp-script subset to JavaScript, with error handling.

import { transpile } from 'llp-script'; import { readFileSync } from 'fs'; const code = readFileSync('./script.llp', 'utf8'); try { const result = transpile(code, { comments: false }); console.log(result.code); } catch (err) { console.error('Transpilation failed:', err); }
llp-script --version
Debug
Known issues
breakingVersion 0.5.0 changed the API from synchronous to callback-based for transpile.
fix
Update calls to transpile to use callback or promise: transpile(code, callback)
affects: <0.5.0
deprecatedThe default export was deprecated in 0.4.0; use named export transpile instead.
fix
Replace default import with named import: import { transpile } from 'llp-script'
affects: >=0.4.0
gotchaTranspiler does not support ES6+ syntax like arrow functions or let; use only var and function declarations.
fix
Ensure input code uses only the supported subset: var, function, if, while, for, etc.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'acorn'
Missing dependency acorn is not installed.
fix
Run npm install acorn
TypeError: transpile is not a function
Incorrect import: using default import instead of named import.
fix
Use import { transpile } from 'llp-script'
SyntaxError: Unexpected token =>
Input code uses arrow functions which are not in the supported subset.
fix
Rewrite arrow function as a regular function expression.
Upgrade
Version history
0.5.0latest on npm
Audit
Dependencies
acornrequiredUsed for parsing JavaScript into an AST, which is then transpiled.
Agent activity
6 hits · last 30 days
node
6
Resources
llp-script — npm install llp-script · libregistry