text-snake-case
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Snake Case

NPM version NPM downloads Bundle size

Transform into a lower case text with underscores between words.

Installation

npm install text-snake-case --save

Usage

import { snakeCase } from "text-snake-case";
 
snakeCase("string"); //=> "string"
snakeCase("dot.case"); //=> "dot_case"
snakeCase("PascalCase"); //=> "pascal_case"
snakeCase("camelCase"); //=> "camel_case"
snakeCase("version 1.2.3"); //=> "version_1_2_3"

The function also accepts options.

License

MIT

Package Sidebar

Install

npm i text-snake-case

Weekly Downloads

1,944

Version

1.0.2

License

MIT

Unpacked Size

5.98 kB

Total Files

7

Last publish

Collaborators

  • dimetrix