骆驼案例将字符串转换为驼峰式大小写安装 $ component install vendethiel/to-camel-case
或 $ npm install to-camel-case
。应用程序接口:toCamelCase(string, first = false)
示例:
toCamelCase("hello-ya").should.equal("helloYa");
toCamelCase("chocolate-rain").should.equal("chocolateRain");
toCamelCase("hello-howare-ya", true).should.equal("HelloHowareYa");
许可证:麻省理工学院
暂无评论