8 lines
246 B
JavaScript
8 lines
246 B
JavaScript
![]() |
var capitalize = require('./capitalize');
|
||
|
var underscored = require('./underscored');
|
||
|
var trim = require('./trim');
|
||
|
|
||
|
module.exports = function humanize(str) {
|
||
|
return capitalize(trim(underscored(str).replace(/_id$/, '').replace(/_/g, ' ')));
|
||
|
};
|