@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.

Readme

Keywords

Package Sidebar

Install

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

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

1.9 kB

Total Files

4

Last publish

Collaborators

  • southawu