Are these identifiers equivalent?
JavaScript (ES6), 62 61 bytes

Saved 1 byte thanks to @JohanKarlsson

Takes input in currying syntax (a)(b). Returns a boolean.

a=&gt;b=&gt;(r=s=&gt;s[0]+s.replace(/-|_/g,'').toUpperCase())(b)==r(a)


Test cases



let f =

a=&gt;b=&gt;(r=s=&gt;s[0]+s.replace(/-|_/g,'').toUpperCase())(b)==r(a)

console.log(f("count")("Count"))                           // falsey
console.log(f("lookMaNoSeparator")("answer"))              // falsey
console.log(f("_test")("test"))                            // falsey
console.log(f("aVariableName")("a_variable_name"))         // truthy
console.log(f("numbers_are_cool123")("numbersAreCool123")) // truthy