How to use the lowerCaseFirst function from change-case

Find comprehensive JavaScript change-case.lowerCaseFirst code examples handpicked from public code repositorys.

33
34
35
36
37
38
39
40
41
42
43
}


class ChangeCase extends TransformString {
  static command = false
  getNewText (text) {
    const functionName = this.functionName || changeCase.lowerCaseFirst(this.name)
    // HACK: Pure Vim's `~` is too aggressive(e.g. remove punctuation, remove white spaces...).
    // Here intentionally making changeCase less aggressive by narrowing target charset.
    const charset = '[\u00C0-\u02AF\u0386-\u0587\\w]'
    const regex = new RegExp(`${charset}+(:?[-./]?${charset}+)*`, 'g')
fork icon1
star icon1
watch icon0

61
62
63
64
65
66
67
68
69
70
function format(displayName, type) {
  switch (type) {
    case FORMAT_TYPES.kebabCase:
      return paramCase(displayName)
    case FORMAT_TYPES.lowerCamelCase:
      return lowerCaseFirst(displayName)
    default:
      return pascalCase(displayName)
  }
}
fork icon0
star icon3
watch icon0

+ 3 other calls in file