Transform to snake_case.
Install
Install all functions of strman
yarn add strman
or just the toSnakeCase function
yarn add strman.tosnakecase
Usage
import { toSnakeCase } from 'strman'
// OR
import toSnakeCase from 'strman.tosnakecase'
Parameters:
Name | Type | Description |
---|---|---|
value |
String | The String! |
- Source:
Returns:
String in snake_case.
- Type
- String
Example
const title = 'A Javascript string manipulation library.'
toSnakeCase(title)
// => 'a_javascript_string_manipulation_library.'