Getting Started
Authoring
Access Control
Reference
Examples
truncate
truncate
Interfaces
TruncationOptions
Defined in: truncate/index.ts:18
Properties
html?
optional html?: boolean;Defined in: truncate/index.ts:20
maxLength?
optional maxLength?: number;Defined in: truncate/index.ts:19
table?
optional table?: boolean;Defined in: truncate/index.ts:21
TruncationResult
Defined in: truncate/index.ts:10
Properties
extracted?
optional extracted?: EncodedPayloadExtracted[];Defined in: truncate/index.ts:15
metadata?
optional metadata?: string;Defined in: truncate/index.ts:14
originalLength
originalLength: number;Defined in: truncate/index.ts:13
text
text: string;Defined in: truncate/index.ts:11
truncated
truncated: boolean;Defined in: truncate/index.ts:12
Functions
truncate()
function truncate(input, options?): TruncationResult;Defined in: truncate/index.ts:27
Parameters
| Parameter | Type |
|---|---|
input |
unknown |
options |
| number | TruncationOptions |