algebra.portSearchSpan
This function gives the size that the search reads: the size of the range, rounded down to an even number.
CLI- Package
- @procedures/algebra · README
- Path
["algebra","portSearchSpan"]- CLI
mark algebra portSearchSpan --size <number>- As data
{"$proc":["algebra","portSearchSpan"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/algebra/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["algebra","portSearchSpan"], { size: 1 });
console.log(JSON.stringify(result));From the command line
$ mark algebra portSearchSpan --size <number>
As data, in a program
{ "$proc": ["algebra", "portSearchSpan"], "input": { "size": 1 } }Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
size | number | yes |
Output
The schema does not list fields (number).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"size": {
"type": "number"
}
},
"required": [
"size"
],
"additionalProperties": false
},
"output": {
"type": "number"
}
}