Xuda logo

xuda.io

Technical docs for Xuda Slim and Xuda CLI

Product overview
Xuda CLI

scripts/

This guide was generated by xuda-cli.

Xuda CLI pages

Repo-driven docs from the xuda-cli package README and generated folder guides.

Docs page

This guide was generated by xuda-cli.

You can remove all generated folder guides later with:

npm run clean:readmes

Use this folder for Xuda javascript units.

What belongs here

  • reusable custom JavaScript logic
  • formatting helpers
  • pure computation or transformation utilities
  • code that should stay visible and named instead of buried in component workflows

Recommended blocks

  • <meta lang="json5">
  • optional <params lang="json5">
  • <code>

Important rules

  • keep the unit focused on one job
  • use params for input and output contracts
  • prefer this folder for reusable JS instead of copying inline expressions everywhere

Example

<meta lang="json5">
{
  id: "normalize_student_name",
  menuTitle: "Normalize Student Name"
}
</meta>

<params lang="json5">
{
  in: {
    raw_name_in: "string"
  },
  out: {
    normalized_name_out: "string"
  }
}
</params>

<code>
return (@raw_name_in || "")
  .trim()
  .toLowerCase()
  .replace(/\b\w/g, (letter) => letter.toUpperCase());
</code>