Skip to content

buildSnakeCase

buildSnakeCase(options?): (input) => string

Defined in: packages/core/src/string/case/snake-case.ts:17

Creates a function that converts strings to snake case.

Rules: - Leading/trailing separators are removed. - All letters are converted to lowercase. - Separators are replaced with underscores. - Multiple consecutive separators are collapsed to a single underscore.

StringCaseOptions

Options to customise separators and kept characters.

A function that converts strings to snake case.

(input) => string