Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

std/text/mod.ts>toSnakeCase

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

Converts a string into snake_case.

Examples

Example 1

import { toSnakeCase } from "https://deno.land/std@0.224.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