Skip to main content
Module

std/text/mod.ts>toSnakeCase

The Deno Standard Library
Go to Latest
function toSnakeCase
import { toSnakeCase } from "https://deno.land/std@0.223.0/text/mod.ts";

Converts a string into snake_case.

Examples

Example 1

import { toSnakeCase } from "https://deno.land/std@0.223.0/text/case.ts";
toSnakeCase("deno is awesome"); // "deno_is_awesome"

Parameters

input: string

The string that is going to be converted into snake_case

Returns

string

The string as snake_case