Convert snake-case to camelCase

Source: https://coderwall.com/p/iprsng/convert-snake-case-to-camelcase

function snakeToCamel(s){
    return s.replace(/(\-\w)/g, function(m){return m[1].toUpperCase();});
}
or as more readable code


var snakeCaseString = 'lorem-ipsum';

var find = /(\-\w)/g;
var convert =  function(matches){
    return matches[1].toUpperCase();
};
var camelCaseString = snakeCaseString.replace(
    find,
    convert
);

Không có nhận xét nào:

Check to be sure that port 22 is enabled before you reload

 https://superuser.com/questions/590600/ufw-is-active-but-not-enabled-why etting  ENABLED=yes  in  /etc/ufw/ufw.conf  did it for me. $ sudo ...