Interactive Demos

Project Playground

JexLang playground uses the official jexlang-ts API with customizable functions/transforms. Swift UI Navigation is presented with real sample snippets from your repository documentation.

JexLang PlaygroundInteractive Demo
Uses official jexlang-ts. Define custom functions/transforms in JS object form and execute expressions with JSON context.
For this simple playground, custom functions/transforms intentionally omit the ctx parameter and directly use variables from the editor context. Under the hood, the wrapper maps your simplified function shape to JexLang runtime signatures.

Valid JSON

Function object parsed successfully

Transform object parsed successfully

RESULT

-

TRY THESE

greeting(user)

price * quantity | formatCurrency

applyDiscount(500, 0.1)

REAL LIBRARY USAGE

import { JexEvaluator } from "jexlang-ts";
const evaluator = new JexEvaluator(
  { env: "prod" },
  {
    applyDiscount: (ctx, amount, rate) => Math.max(amount * (1 - rate), 40)
  },
  {
    formatCurrency: (input) => "$" + Number(input).toFixed(2)
  }
);
const output = evaluator.evaluate("applyDiscount(price, rate)", { price: 120, rate: 0.15 });

JexLang implementations are available for TypeScript and Java, with Swift support upcoming. Refer to the GitHub repository for the latest status and full docs.

HOSTED (SEPARATE URL) USAGE

<script type="module">
  import { JexEvaluator } from "https://cdn.jsdelivr.net/npm/jexlang-ts@1.0.1/dist/index.js";
  const evaluator = new JexEvaluator({}, { double: (ctx, x) => x * 2 }, {});
  console.log(evaluator.evaluate("double(21)"));
</script>

This page can be deployed as a standalone /playground route or split into a dedicated site URL.

Swift UI Navigation SamplesREADME-Based
Static examples derived from your swift-ui-navigation repository docs.

import SwiftUINavigation

enum AppRoutes: Route {
  case home
  case details(id: String)
  case settings

  var name: String {
    switch self {
    case .home: return "Home"
    case .details: return "Details"
    case .settings: return "Settings"
    }
  }

  var params: any RouteParams {
    switch self {
    case .details(let id): return id
    default: return EmptyParams()
    }
  }
}

Reference Repositories
Direct links to source repos used for these demos.