Blame view

node_modules/underscore.string/humanize.js 246 Bytes
f7563de62   Palak Handa   first commit
1
2
3
4
5
6
7
  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, ' ')));
  };