← All pipes
Text

camelToSnake

Convert camel case to underscores.

Use it in your component

Standalone component
import { Component } from '@angular/core';
import { CamelToSnakePipe } from 'extra-pipe';

@Component({
  standalone: true,
  imports: [CamelToSnakePipe],
  template: `{{ 'extraPipe' | camelToSnake }}`,
})
export class ExampleComponent {

}

Template
{{ 'extraPipe' | camelToSnake }}

Try it live.

The output below runs the packed library. Edit data, not code.

Use double quotes for text, or a number, array, object or null.
No parameters: use []. Locale is controlled separately.
This pipe has no locale override.
Live template data
readonly value = "extraPipe";

{{ value | camelToSnake }}

Rendered output

extra_pipe