lib/map.js
function _getDataValue(data, path) {
    if (data === undefined) {
        return undefined;
    }
    if (typeof path === 'number') {
        return data[path];
    }
    if (typeof path === 'string') {
        var keys = path.split(_separator);
        if (keys.length <= 1) {
            return data[keys[0]];
        }
        return _getDataValue(
            data[keys[0]],
            keys
                .slice(1)
                .join(_separator)
        );
    }
    return undefined;
}
function _getDataValue(data, path) {
    if (data === undefined) {
        return undefined;
    }
    if (typeof path === 'number') {
        return data[path];
    }
    if (typeof path === 'string') {
        var keys = path.split(_separator);
        if (keys.length <= 1) {
            return data[keys[0]];
        }
        return _getDataValue(
            data[keys[0]],
            keys
                .slice(1)
                .join(_separator)
        );
    }
    return undefined;
}
function _getDataValue ( data , path ) { if ( data === undefined ) { return undefined ; } if ( typeof path === 'number' ) { return data [ path ] ; } if ( typeof path === 'string' ) { var keys = path . split ( _separator ) ; if ( keys . length <= 1 ) { return data [ keys [ 0 ] ] ; } return _getDataValue ( data [ keys [ 0 ] ] , keys . slice ( 1 ) . join ( _separator ) ) ; } return undefined ; }
Returns the value of an object from its path
@param data Object to map
@param path Path to value in object
@returns {*}
@private
Returns the value of an object from its path