← All procedures

quantity.min

No description.

CLI
Package
@procedures/quantity · README
Path
["quantity","min"]
CLI
mark quantity min --a <object | object> --b <object | object>
As data
{"$proc":["quantity","min"],"input":{}}

Use it

In TypeScript

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

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

From the command line

$ mark quantity min --a <object | object> --b <object | object>

As data, in a program

{ "$proc": ["quantity", "min"], "input": { "a": "<a>", "b": "<b>" } }

Input

FieldTypeRequiredDefaultDescription
aobject | objectyes
bobject | objectyes

Output

The schema does not list fields (object | object).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "a": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "value": {
                "type": "number"
              },
              "unit": {
                "type": "string"
              }
            },
            "required": [
              "value",
              "unit"
            ],
            "additionalProperties": {}
          },
          {
            "type": "object",
            "properties": {
              "value": {
                "type": "string",
                "const": "infinite"
              },
              "unit": {
                "type": "string"
              }
            },
            "required": [
              "value",
              "unit"
            ],
            "additionalProperties": {}
          }
        ]
      },
      "b": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "value": {
                "type": "number"
              },
              "unit": {
                "type": "string"
              }
            },
            "required": [
              "value",
              "unit"
            ],
            "additionalProperties": {}
          },
          {
            "type": "object",
            "properties": {
              "value": {
                "type": "string",
                "const": "infinite"
              },
              "unit": {
                "type": "string"
              }
            },
            "required": [
              "value",
              "unit"
            ],
            "additionalProperties": {}
          }
        ]
      }
    },
    "required": [
      "a",
      "b"
    ],
    "additionalProperties": false
  },
  "output": {
    "anyOf": [
      {
        "type": "object",
        "properties": {
          "value": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "value",
          "unit"
        ],
        "additionalProperties": {}
      },
      {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "const": "infinite"
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "value",
          "unit"
        ],
        "additionalProperties": {}
      }
    ]
  }
}