Skip to content

Snake Case

toSnakeCase is a function convert a string to snake case.

Example

This function will convert any string into snake case:

ts
import { toSnakeCase } from "@titocandradev/neatcore";

const result = toSnakeCase("hello world");
// hello_world