← All procedures

quantity.convertible

No description.

CLI
Package
@procedures/quantity · README
Path
["quantity","convertible"]
CLI
mark quantity convertible --from <string> --to <string>
As data
{"$proc":["quantity","convertible"],"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","convertible"], { from: "<from>", to: "<to>" });
console.log(JSON.stringify(result));

From the command line

$ mark quantity convertible --from <string> --to <string>

As data, in a program

{
  "$proc": ["quantity", "convertible"],
  "input": { "from": "<from>", "to": "<to>" }
}

Input

FieldTypeRequiredDefaultDescription
fromstringyes
tostringyes

Output

The schema does not list fields (boolean).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "from": {
        "type": "string"
      },
      "to": {
        "type": "string"
      }
    },
    "required": [
      "from",
      "to"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "boolean"
  }
}