{"id":25900,"library":"llp-script","title":"llp-script","description":"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.","status":"active","version":"0.5.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install llp-script","lang":"bash","label":"npm"},{"cmd":"yarn add llp-script","lang":"bash","label":"yarn"},{"cmd":"pnpm add llp-script","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for parsing JavaScript into an AST, which is then transpiled.","package":"acorn","optional":false}],"imports":[{"note":"The package is ESM-only. CommonJS require is not supported.","wrong":"const transpile = require('llp-script').transpile","symbol":"transpile","correct":"import { transpile } from 'llp-script'"},{"note":"Only named exports are provided. Default export is not available.","wrong":"import { parse } from 'llp-script/parse'","symbol":"parse","correct":"import { parse } from 'llp-script'"},{"note":"There is a default export that is the transpile function itself, but using named import for transpile is more explicit.","wrong":"import * as llp from 'llp-script'","symbol":"default","correct":"import llp from 'llp-script'"}],"quickstart":{"code":"import { transpile } from 'llp-script';\nimport { readFileSync } from 'fs';\n\nconst code = readFileSync('./script.llp', 'utf8');\ntry {\n  const result = transpile(code, { comments: false });\n  console.log(result.code);\n} catch (err) {\n  console.error('Transpilation failed:', err);\n}","lang":"typescript","description":"Shows basic usage of transpiling a file from llp-script subset to JavaScript, with error handling."},"warnings":[{"fix":"Update calls to transpile to use callback or promise: transpile(code, callback)","message":"Version 0.5.0 changed the API from synchronous to callback-based for transpile.","severity":"breaking","affected_versions":"<0.5.0"},{"fix":"Replace default import with named import: import { transpile } from 'llp-script'","message":"The default export was deprecated in 0.4.0; use named export transpile instead.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Ensure input code uses only the supported subset: var, function, if, while, for, etc.","message":"Transpiler does not support ES6+ syntax like arrow functions or let; use only var and function declarations.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm install acorn","cause":"Missing dependency acorn is not installed.","error":"Error: Cannot find module 'acorn'"},{"fix":"Use import { transpile } from 'llp-script'","cause":"Incorrect import: using default import instead of named import.","error":"TypeError: transpile is not a function"},{"fix":"Rewrite arrow function as a regular function expression.","cause":"Input code uses arrow functions which are not in the supported subset.","error":"SyntaxError: Unexpected token =>"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}