← All procedures

algebra.modelSource

This function gives the source of the formula of a named model, for a reader of a result.

CLI
Package
@procedures/algebra · README
Path
["algebra","modelSource"]
CLI
mark algebra modelSource --name <string>
As data
{"$proc":["algebra","modelSource"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/algebra/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["algebra","modelSource"], { name: "<name>" });
console.log(JSON.stringify(result));

From the command line

$ mark algebra modelSource --name <string>

As data, in a program

{ "$proc": ["algebra", "modelSource"], "input": { "name": "<name>" } }

Input

FieldTypeRequiredDefaultDescription
namestringyes

Output

The schema does not list fields (string | null).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string"
      }
    },
    "required": [
      "name"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": [
      "string",
      "null"
    ]
  }
}