ran npm run tdd
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
module.exports = toSnakeCase = str =>
|
||||
const toSnakeCase = str =>
|
||||
str &&
|
||||
str
|
||||
.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)
|
||||
.map(x => x.toLowerCase())
|
||||
.join('_');
|
||||
.join('_');
|
||||
module.exports = toSnakeCase
|
||||
Reference in New Issue
Block a user