Skip to content

Commit 715aae6

Browse files
abdullahtariq1171jdalton
authored andcommitted
add snakeCase example with digit (#3993)
add `snakeCase` example with digit
1 parent 6018350 commit 715aae6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

snakeCase.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ import words from './words.js'
1919
*
2020
* snakeCase('--FOO-BAR--')
2121
* // => 'foo_bar'
22+
*
23+
* snakeCase('foo2bar')
24+
* // => 'foo_2_bar'
2225
*/
2326
const snakeCase = (string) => (
2427
words(`${string}`.replace(/['\u2019]/g, '')).reduce((result, word, index) => (

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy