toip.tools

function · Browser and Node

saidify

Fills the version string and SAID fields. fields must list every field in order.

@toip-tools/eventlogView source
TypeScriptImport
import { saidify } from "@toip-tools/eventlog";

Declaration

TypeScriptSignature
saidify<T extends Record<string, unknown>>(protocol: Protocol, fields: T, saidFields: ("d" | "i")[]): {
    raw: string;
    body: T;
};

Parameters

protocolrequired
Protocol
fieldsrequired
T
saidFieldsrequired
("d" | "i")[]

Returns

{ raw: string; body: T; }

Returned object

The returned object exposes these properties and methods.

Properties

rawrequired
string
bodyrequired
T