getSanitizedTasks()
function getSanitizedTasks(tasks: Task[]): TaskWithSanitizedContent[]
Takes an array of tasks and returns a new array with sanitized content added as 'sanitizedContent' property to each task.
Parameters
Parameter | Type | Description |
---|---|---|
tasks | Task [] | Array of Task objects to sanitize |
Returns
Array of tasks with added sanitizedContent property
See
Example
const tasks = [{ content: '**Bold** task', ... }]
getSanitizedTasks(tasks) // [{ content: '**Bold** task', sanitizedContent: 'Bold task', ... }]