This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {Object|String} data string or keys of object are named in form of snake | |
* @param {number} depth to which level of keys should it process | |
* @return {Object|String} string or keys of object are named in form of camel case | |
*/ | |
exports.snakeToCamel = function(data, depth) { | |
if (Util.isObject(data)) { | |
if (typeof depth === 'undefined') { | |
depth = 1; | |
} |