{"library":"smack-js-compiler","title":"Smack JS Compiler","description":"A compiler/transpiler for the purely functional language 'Smack', converting Smack source code to JavaScript. The current stable version is 1.1.1, with moderate release cadence. Key differentiator: it compiles a minimal functional language to JavaScript, targeting both Node.js and browser environments. Written in JavaScript, it includes a parser and intermediary representation. Not to be confused with other Smack-related tools.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install smack-js-compiler"],"cli":{"name":"smack","version":null}},"imports":["import { compile } from 'smack-js-compiler'","import { parse } from 'smack-js-compiler'","import { SmackCompiler } from 'smack-js-compiler'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { compile } from 'smack-js-compiler';\n\nconst smackCode = `\n  def main = add(2, 3)\n  def add(a, b) = a + b\n`;\n\ntry {\n  const jsCode = compile(smackCode);\n  console.log(jsCode);\n} catch (err) {\n  console.error('Compilation failed:', err.message);\n}","lang":"typescript","description":"Compiles a simple Smack function definition to JavaScript using the named compile export.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}