简体   繁体   English

PascalCase 到 camelCase,在 angular 项目中查找和替换

[英]PascalCase to camelCase, Finding and replacing in an angular proj

So, I was just wondering if there is a software or a program that identifies PascalCase and then covert it to camelCase?所以,我只是想知道是否有软件或程序可以识别 PascalCase,然后将其转换为 camelCase? Or at least just identify/find the PascalCase so that I could do it myself manually.或者至少只是识别/找到 PascalCase,以便我可以自己手动完成。 I am currently picking the cases manually and changing them from each file which feels like labor work honestly, so repetitive and boring.我目前正在手动挑选案例并从每个文件中更改它们,这感觉就像是诚实的劳动,如此重复和无聊。 It would really help me out if someone knows such thing, thanks.如果有人知道这样的事情真的会帮助我,谢谢。

Work工作

Take a look on lodash library.看看lodash库。 It cannot determine whether string is in PascalCase or not, but it can convert anything to camelCase.它无法确定字符串是否为 PascalCase,但它可以将任何内容转换为 camelCase。
Take a look onto this function _.camelCase看看这个 function _.camelCase

_.camelCase('PascalCase') // => 'pascalCase'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM