Transfer CamelCase to Underscore.
Usage:
const ret1 = convertCamelToUnder('ABC');const ret2 = convertCamelToUnder('aBC');console.log(ret1);console.log(ret2); Copy
const ret1 = convertCamelToUnder('ABC');const ret2 = convertCamelToUnder('aBC');console.log(ret1);console.log(ret2);
Output:
a_b_c a_b_c Copy
a_b_c a_b_c
'aBC' or 'ABC'
'a_b_c'
Transfer CamelCase to Underscore.
Usage:
Output: