← All procedures

client.zip

Zip multiple arrays into array of tuples

browsernot registered
Package
@procedures/client · README
Path
["client","zip"]
CLI
Not a mark command: it is not in the default registry.
As data
{"$proc":["client","zip"],"input":{}}
Tags
core, array

Try it in the Composer →

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","zip"], { arrays: [] });
console.log(JSON.stringify(result));

As data, in a program

{ "$proc": ["client", "zip"], "input": { "arrays": [] } }

Input

FieldTypeRequired
arraysunknown[][]yes

Output

The schema does not list fields (any[][]).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "arrays": {
        "type": "array",
        "items": {
          "type": "array",
          "items": {}
        },
        "description": "The arrays"
      }
    },
    "required": [
      "arrays"
    ]
  },
  "output": {
    "type": "array",
    "items": {
      "type": "array",
      "items": {}
    },
    "description": "One tuple for each index"
  }
}