@southawu/simple-str-to-snake-case

1.0.2 • Public • Published

simple-str-to-snake-case

A simple library to convert strings to snake_case.

Installation

Install via npm:

npm install simple-str-to-snake-case

Usage

const toSnakeCase = require('simple-str-to-snake-case');

console.log(toSnakeCase('Hello World')); // Output: hello_world
console.log(toSnakeCase('helloWorld'));  // Output: hello_world
console.log(toSnakeCase('Hello, World!')); // Output: hello_world

API

toSnakeCase(str)

  • str: string - The input string to be converted to snake_case.
  • Returns: string - The snake_case version of the input string.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.21latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.21
1.0.10
1.0.00

Package Sidebar

Install

npm i @southawu/simple-str-to-snake-case

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

1.9 kB

Total Files

4

Last publish

Collaborators

  • southawu