---
title: sensu.toSensuName() function
description: sensu.toSensuName() translates a string value to a Sensu name by replacing non-alphanumeric characters ([a-zA-Z0-9_.-]) with underscores (_).
url: https://docs.influxdata.com/flux/v0/stdlib/contrib/sranka/sensu/tosensuname/
estimated_tokens: 507
product: Flux
version: v0
---

# sensu.toSensuName() function

-   Flux 0.90.0+
-   View InfluxDB support

`sensu.toSensuName()` is a user-contributed function maintained by the [package author](#package-author-and-maintainer).

`sensu.toSensuName()` translates a string value to a Sensu name by replacing non-alphanumeric characters (`[a-zA-Z0-9_.-]`) with underscores (`_`).

##### Function type signature

```js
(v: string) => string
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### v

(Required) String to operate on.

## Examples

### Convert a string into a Sensu name

```js
import "contrib/sranka/sensu"

sensu.toSensuName(v: "Example name conversion")// Returns "Example_name_conversion"

```
