2018-03-29 20:42:43 +00:00
|
|
|
// License: LGPL-3.0-or-later
|
2018-03-25 17:30:42 +00:00
|
|
|
// "email_address" => "email address"
|
|
|
|
// "emailAddress" => "email address"
|
|
|
|
|
|
|
|
module.exports = str =>
|
|
|
|
str
|
|
|
|
.replace('_', ' ')
|
|
|
|
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
|
|
.replace(/\b([A-Z]+)([A-Z])([a-z])/, '$1 $2$3')
|
|
|
|
.toLowerCase()
|
|
|
|
|
|
|
|
|