How to use the decapitalize function from underscore.string

Find comprehensive JavaScript underscore.string.decapitalize code examples handpicked from public code repositorys.

15
16
17
18
19
20
21
22
23
24
25
/**
 * 
 * @param str 
 */
function decapitalize(str) {
    return _s.decapitalize(str);
}


/**
 * 
fork icon183
star icon970
watch icon0

+ 4 other calls in file

46
47
48
49
50
51
52
53
54

this.slugifiedName = slugify(this.moduleName);

this.slugifiedNameCapitalize = _.camelize(this.moduleName);

this.slugifiedNameCamelize = s.decapitalize(this.moduleName);

// Get Directives from user config
this.modules = this.config.get('directives');
fork icon0
star icon0
watch icon0

1
2
3
4
5
6
7
8
9
10
11


module.exports = {
  getNameCamel: name => {
    const temp = _.underscored(name);
    if (temp.startsWith('get_')) {
      return _.decapitalize(name.substr(3));
    }
    return name;
  },
  getNameSnake: name => {
fork icon0
star icon0
watch icon0