将字符串转换为驼峰式写法。
langx.camelize(str)
Example: camelize “sky-lark” 后,b 显示转换值 skyLary 。
<!DOCTYPE html> <html> <head> <style> </style> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.3/require.min.js"></script> <script> require.config({ baseUrl: "./", packages: [{ name: "skylark", location: "../../../src/skylark" }, ] }); </script> </head> <body> camelize("sky-lark") . result <b></b> <script> require(["skylark/finder", "skylark/langx", "skylark/datax"], function(finder, langx, datax) { datax.text(finder.find("b"), langx.camelize("sky-lark")); }); </script> </body> </html>