client.fromEntries
Create object from [key, value] pairs
browsernot registered- Package
- @procedures/client · README
- Path
["client","fromEntries"]- CLI
- Not a
markcommand: it is not in the default registry. - As data
{"$proc":["client","fromEntries"],"input":{}}- Tags
- core, object
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","fromEntries"], { entries: [] });
console.log(JSON.stringify(result));As data, in a program
{ "$proc": ["client", "fromEntries"], "input": { "entries": [] } }Input
| Field | Type | Required |
|---|---|---|
entries | [string, unknown][] | yes |
Output
The schema does not list fields (object).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "string"
},
{}
],
"additionalItems": false,
"minItems": 2,
"maxItems": 2
},
"description": "The [key, value] pairs"
}
},
"required": [
"entries"
]
},
"output": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "The object of the pairs"
}
}