Function convertCamelToUnder

  • Transfer CamelCase to Underscore.

    Usage:

    const ret1 = convertCamelToUnder('ABC');
    const ret2 = convertCamelToUnder('aBC');
    console.log(ret1);
    console.log(ret2);

    Output:

    a_b_c
    a_b_c
    

    Parameters

    • camelCase: string

      'aBC' or 'ABC'

    Returns string

    'a_b_c'