> "createTechBook".replace( /([A-Z])/g, '-$1') <- "create-Tech-Book" > "createTechBook".split(/(?=[A-Z])/) <- ["create", "Tech", "Book"]
转载于:https://www.cnblogs.com/muxiWu/p/8862058.html
> "createTechBook".replace( /([A-Z])/g, '-$1') <- "create-Tech-Book" > "createTechBook".split(/(?=[A-Z])/) <- ["create", "Tech", "Book"]
转载于:https://www.cnblogs.com/muxiWu/p/8862058.html