quantity.isQuantity
This function tells if a value from data is a quantity: a finite number and a canonical unit.
CLI- Package
- @procedures/quantity · README
- Path
["quantity","isQuantity"]- CLI
mark quantity isQuantity --value <any>- As data
{"$proc":["quantity","isQuantity"],"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","isQuantity"], { value: "<value>" });
console.log(JSON.stringify(result));From the command line
$ mark quantity isQuantity --value <any>
As data, in a program
{ "$proc": ["quantity", "isQuantity"], "input": { "value": "<value>" } }Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
value | any | yes |
Output
The schema does not list fields (boolean).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"value": {}
},
"required": [
"value"
],
"additionalProperties": false
},
"output": {
"type": "boolean"
}
}