← All procedures
quantity.convert
No description.
CLI- Package
- @procedures/quantity · README
- Path
["quantity","convert"]- CLI
mark quantity convert --amount <object> --to <string>- As data
{"$proc":["quantity","convert"],"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","convert"], { amount: {}, to: "<to>" });
console.log(JSON.stringify(result));From the command line
$ mark quantity convert --amount <object> --to <string>
As data, in a program
{
"$proc": ["quantity", "convert"],
"input": { "amount": {}, "to": "<to>" }
}Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"amount": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"unit": {
"type": "string"
}
},
"required": [
"value",
"unit"
],
"additionalProperties": {}
},
"to": {
"type": "string"
},
"on": {
"type": "object",
"properties": {
"hz": {
"type": "number",
"description": "The timer frequency of the kernel converts jiffies: at 250, one jiffy is 4 ms."
}
},
"additionalProperties": {}
}
},
"required": [
"amount",
"to"
],
"additionalProperties": false
},
"output": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"unit": {
"type": "string"
}
},
"required": [
"value",
"unit"
],
"additionalProperties": {}
}
}