client.typeof
Get type of value (string, number, boolean, object, array, null, undefined, function)
browsernot registered- Package
- @procedures/client · README
- Path
["client","typeof"]- CLI
- Not a
markcommand: it is not in the default registry. - As data
{"$proc":["client","typeof"],"input":{}}- Tags
- core, type
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY, allCoreProcedures } from "@procedures/client";
for (const procedure of allCoreProcedures) {
if (!PROCEDURE_REGISTRY.has(procedure.path)) PROCEDURE_REGISTRY.register(procedure);
}
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["client","typeof"], {});
console.log(JSON.stringify(result));As data, in a program
{ "$proc": ["client", "typeof"], "input": {} }Input
| Field | Type | Required |
|---|---|---|
value | unknown | no |
Output
The schema does not list fields (string).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"value": {
"description": "The value"
}
}
},
"output": {
"type": "string",
"description": "The type name of the value"
}
}