quantity.kindOfQuantity
This function gives the kind that a quantity measures.
CLI- Package
- @procedures/quantity · README
- Path
["quantity","kindOfQuantity"]- CLI
mark quantity kindOfQuantity --amount <object | object>- As data
{"$proc":["quantity","kindOfQuantity"],"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","kindOfQuantity"], { amount: "<amount>" });
console.log(JSON.stringify(result));From the command line
$ mark quantity kindOfQuantity --amount <object | object>
As data, in a program
{
"$proc": ["quantity", "kindOfQuantity"],
"input": { "amount": "<amount>" }
}Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
amount | object | object | yes |
Output
The schema does not list fields ("area" | "charge" | "count" | "current" | "data" | "data-rate" | "derived" | "energy" | "energy-price" | "frequency" | "length" | "level" | "mass" | "money" | "money-rate" | "power" | "ratio" | "resistance" | "specific-power" | "specific-volume-rate" | "speed" | "temperature" | "time" | "transfer-rate" | "voltage" | "volume").
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"amount": {
"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": [
"amount"
],
"additionalProperties": false
},
"output": {
"type": "string",
"enum": [
"area",
"charge",
"count",
"current",
"data",
"data-rate",
"derived",
"energy",
"energy-price",
"frequency",
"length",
"level",
"mass",
"money",
"money-rate",
"power",
"ratio",
"resistance",
"specific-power",
"specific-volume-rate",
"speed",
"temperature",
"time",
"transfer-rate",
"voltage",
"volume"
]
}
}