1.0.2 • Published 12 months ago

@southawu/simple-str-to-snake-case v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

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

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago