client.startsWith
Check if string starts with search string
browsernot registered- Package
- @procedures/client · README
- Path
["client","startsWith"]- CLI
- Not a
markcommand: it is not in the default registry. - As data
{"$proc":["client","startsWith"],"input":{}}- Tags
- core, string
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","startsWith"], { value: "<value>", search: "<search>" });
console.log(JSON.stringify(result));As data, in a program
{
"$proc": ["client", "startsWith"],
"input": { "value": "<value>", "search": "<search>" }
}Input
| Field | Type | Required |
|---|---|---|
value | string | yes |
search | string | yes |
Output
The schema does not list fields (boolean).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "The value"
},
"search": {
"type": "string",
"description": "The text to find"
}
},
"required": [
"value",
"search"
]
},
"output": {
"type": "boolean",
"description": "True when the string starts with the prefix"
}
}