Skip to content

写个函数, 可以转化下划线命名到驼峰命名 #24

Description

@Hongbusi
function underlineToHump(str) {
  return str.replace(/\_(\w)/g, (_, letter) => {
    return letter.toUpperCase()
  })
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions