# cleanValue()

[**PromptScript API**](https://getpromptscript.dev/api-reference/index.md)

***

# Function: cleanValue()

> **cleanValue**\<`T`\>(`value`): `T`

Defined in: [eval/src/sanitize.ts:22](https://github.com/mrwogu/promptscript/blob/49aa50f943865b985366c4eda6e95c5a31ef39a6/packages/eval/src/sanitize.ts#L22)

[cleanText](https://getpromptscript.dev/api-reference/eval/src/functions/cleanText/index.md) on every string of a JSON-like value; object keys stay.

## Type Parameters

### T

`T`

## Parameters

### value

`T`

## Returns

`T`